x86/emul: auxiliary definition of pseudo keyword fallthrough

The pseudo keyword fallthrough shall be used to make explicit the
fallthrough intention at the end of a case statement (doing this
using comments is deprecated).

A definition of such pseudo keyword is already present in the
Xen build. This auxiliary definition makes it available also for
for test and fuzzing harness without iterfearing with the one
that the Xen build has.

Signed-off-by: Federico Serafini <federico.serafini@bugseng.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
This commit is contained in:
Federico Serafini authored and Jan Beulich committed 2024-11-14 13:02:02 +01:00
1 parent 1179d51dcb
commit 5bf8f2f5cc
1 file changed
+10
+10
View File
@@ -56,6 +56,16 @@
#define cf_check /* No Control Flow Integriy checking */
/*
* Pseudo keyword 'fallthrough' to make explicit the fallthrough intention at
* the end of a case statement block.
*/
#if !defined(__clang__) && (__GNUC__ >= 7)
# define fallthrough __attribute__((__fallthrough__))
#else
# define fallthrough do {} while (0) /* fallthrough */
#endif
#ifdef __GCC_ASM_FLAG_OUTPUTS__
# define ASM_FLAG_OUT(yes, no) yes
#else
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.