diff options
author | Marek Polacek <polacek@redhat.com> | 2016-09-26 09:42:50 +0000 |
---|---|---|
committer | Marek Polacek <mpolacek@gcc.gnu.org> | 2016-09-26 09:42:50 +0000 |
commit | 81fea426da8c4687bb32e6894dc26f00ae211822 (patch) | |
tree | 8b84b3de175727d09b7dcf1b5703e0d46b64f9e7 /gcc/system.h | |
parent | 392fa55c799358e198ca85fbea548e60359133c5 (diff) | |
download | gcc-81fea426da8c4687bb32e6894dc26f00ae211822.zip gcc-81fea426da8c4687bb32e6894dc26f00ae211822.tar.gz gcc-81fea426da8c4687bb32e6894dc26f00ae211822.tar.bz2 |
Implement -Wimplicit-fallthrough.
Co-Authored-By: Jakub Jelinek <jakub@redhat.com>
From-SVN: r240485
Diffstat (limited to 'gcc/system.h')
-rw-r--r-- | gcc/system.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/system.h b/gcc/system.h index 8a17197..8ca71cf 100644 --- a/gcc/system.h +++ b/gcc/system.h @@ -746,6 +746,12 @@ extern void fancy_abort (const char *, int, const char *) ATTRIBUTE_NORETURN; #define gcc_unreachable() (fancy_abort (__FILE__, __LINE__, __FUNCTION__)) #endif +#if GCC_VERSION >= 7000 +# define gcc_fallthrough() __attribute__((fallthrough)) +#else +# define gcc_fallthrough() +#endif + #if GCC_VERSION >= 3001 #define STATIC_CONSTANT_P(X) (__builtin_constant_p (X) && (X)) #else |