reafactor noreturn macro

This commit is contained in:
Yuichi Nishiwaki 2014-03-19 17:45:35 +09:00
parent 8625f75470
commit 0b7597b80b
1 changed files with 3 additions and 1 deletions

View File

@ -10,9 +10,11 @@ extern "C" {
#endif #endif
#if __STDC_VERSION__ >= 201112L #if __STDC_VERSION__ >= 201112L
# define noreturn _Noreturn # include <stdnoreturn.h>
#elif __GNUC__ || __clang__ #elif __GNUC__ || __clang__
# define noreturn __attribute__((noreturn)) # define noreturn __attribute__((noreturn))
#else
# define noreturn
#endif #endif
#define FALLTHROUGH ((void)0) #define FALLTHROUGH ((void)0)