mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-09-22 10:43:39 -04:00
compiler: Add fallthrough() helper
https://bugzilla.nasm.us/show_bug.cgi?id=3392465 Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
This commit is contained in:
@@ -240,6 +240,15 @@ size_t strnlen(const char *s, size_t maxlen);
|
||||
# define inline_prototypes
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Fallthrough handling.
|
||||
*/
|
||||
#ifdef HAVE_FALLTHROUGH_ATTRIBUTE
|
||||
# define fallthrough() __attribute__((fallthrough))
|
||||
#else
|
||||
# define fallthrough() /* fall through */
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Hints to the compiler that a particular branch of code is more or
|
||||
* less likely to be taken.
|
||||
|
Reference in New Issue
Block a user