]> Savannah Git Hosting - gnulib.git/commitdiff
Fix last commit.
authorBruno Haible <bruno@clisp.org>
Wed, 5 Jan 2022 19:03:13 +0000 (20:03 +0100)
committerBruno Haible <bruno@clisp.org>
Wed, 5 Jan 2022 19:03:13 +0000 (20:03 +0100)
Based on a patch by José E. Marchesi <jemarch@gnu.org>, reported in
<https://lists.gnu.org/archive/html/bug-gnulib/2022-01/msg00036.html>.

* m4/gnulib-common.m4 (gl_CC_GNULIB_WARNINGS): Don't enable
-Wimplicit-fallthrough for GCC < 7.

ChangeLog
m4/gnulib-common.m4

index f10b0b2aadf0c82475284c121bfd93d9efdfbeeb..ad29aed978a9d2874eb5182ab59e3690c78eb914 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2022-01-05  Bruno Haible  <bruno@clisp.org>
+
+       Fix last commit.
+       Based on a patch by José E. Marchesi <jemarch@gnu.org>, reported in
+       <https://lists.gnu.org/archive/html/bug-gnulib/2022-01/msg00036.html>.
+       * m4/gnulib-common.m4 (gl_CC_GNULIB_WARNINGS): Don't enable
+       -Wimplicit-fallthrough for GCC < 7.
+
 2022-01-05  Bruno Haible  <bruno@clisp.org>
 
        gnulib-tool: Avoid known warnings that reflect Gnulib's coding style.
index 179aac7aa1e461e1172776a4ccad6928c55551d3..afe08360837395d8a745ba0d0fd39575b8bbac94 100644 (file)
@@ -896,7 +896,7 @@ AC_DEFUN([gl_CC_GNULIB_WARNINGS],
     dnl -Wno-conversion                       >= 3            >= 3.9
     dnl -Wno-float-conversion                 >= 4.9          >= 3.9
     dnl -Wno-float-equal                      >= 3            >= 3.9
-    dnl -Wimplicit-fallthrough                >= 3            >= 3.9
+    dnl -Wimplicit-fallthrough                >= 7            >= 3.9
     dnl -Wno-pedantic                         >= 4.8          >= 3.9
     dnl -Wno-sign-compare                     >= 3            >= 3.9
     dnl -Wno-sign-conversion                  >= 4.3          >= 3.9
@@ -911,7 +911,6 @@ AC_DEFUN([gl_CC_GNULIB_WARNINGS],
       -Wno-cast-qual
       -Wno-conversion
       -Wno-float-equal
-      -Wimplicit-fallthrough
       -Wno-sign-compare
       -Wno-undef
       -Wno-unused-function
@@ -920,6 +919,9 @@ AC_DEFUN([gl_CC_GNULIB_WARNINGS],
       #if __GNUC__ + (__GNUC_MINOR__ >= 9) > 4 || (__clang_major__ + (__clang_minor__ >= 9) > 3)
       -Wno-float-conversion
       #endif
+      #if __GNUC__ >= 7 || (__clang_major__ + (__clang_minor__ >= 9) > 3)
+      -Wimplicit-fallthrough
+      #endif
       #if __GNUC__ + (__GNUC_MINOR__ >= 8) > 4 || (__clang_major__ + (__clang_minor__ >= 9) > 3)
       -Wno-pedantic
       #endif