chiark / gitweb /
basic/siphash24.c: Only disable -Wimplicit-fallthrough on gcc-7+
authorSven Eden <yamakuzure@gmx.net>
Tue, 12 Dec 2017 17:35:44 +0000 (18:35 +0100)
committerSven Eden <yamakuzure@gmx.net>
Tue, 12 Dec 2017 17:35:44 +0000 (18:35 +0100)
src/basic/siphash24.c

index e8b18dd16cd620a927e86b60c65ad832f40278aa..69794b6806b2a8e711d522dcd4f4ace1fe7cbffa 100644 (file)
@@ -69,7 +69,7 @@ void siphash24_init(struct siphash *state, const uint8_t k[16]) {
 }
 
 #if 1 /// let's add a diagnostic push to silence -Wimplicit-fallthrough to elogind
-#  ifdef __GNUC__
+#  if defined(__GNUC__) && (__GNUC__ > 6)
 #    pragma GCC diagnostic push
 #    pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
 #  endif // __GNUC__