1
0
mirror of https://git.savannah.gnu.org/git/gperf.git synced 2025-12-02 21:19:24 +00:00

Avoid "implicit fallthrough" warnings also from clang.

This commit is contained in:
Bruno Haible
2018-09-09 01:14:20 +02:00
parent 11487a61ce
commit 50840436d5
10 changed files with 72 additions and 56 deletions

View File

@@ -937,7 +937,7 @@ Output::output_hash_function () const
/* Pseudo-statement or comment that avoids a compiler warning or
lint warning. */
const char * const fallthrough_marker =
"#if defined __cplusplus && __cplusplus >= 201703L\n"
"#if defined __cplusplus && (__cplusplus >= 201703L || (__cplusplus >= 201103L && defined __clang_major__ && defined __clang_minor__ && __clang_major__ + (__clang_minor__ >= 9) > 3))\n"
" [[fallthrough]];\n"
"#elif defined __GNUC__ && __GNUC__ >= 7\n"
" __attribute__ ((__fallthrough__));\n"