]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
configure: Clear libc_cv_cc_wimplicit_fallthrough if not supported
authorH.J. Lu <hjl.tools@gmail.com>
Thu, 9 Jan 2025 23:09:16 +0000 (07:09 +0800)
committerH.J. Lu <hjl.tools@gmail.com>
Fri, 10 Jan 2025 01:07:05 +0000 (09:07 +0800)
Clear libc_cv_cc_wimplicit_fallthrough if -Wimplicit-fallthrough isn't
supported.  Tested with GCC 6.4.1 on x86-64.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Sam James <sam@gentoo.org>
configure
configure.ac

index b410ee4bd9dc0d39b5fd0c6e8de05459b9091c93..eb8abd0054320f4c17ded92825ab451efa2eb6c9 100755 (executable)
--- a/configure
+++ b/configure
@@ -7888,7 +7888,7 @@ else case e in #(
 then :
   libc_cv_cc_wimplicit_fallthrough=-Wimplicit-fallthrough
 else case e in #(
-  e) libc_cv_cc_wimplicit_fallthrough=-Wimplicit-fallthrough ;;
+  e) libc_cv_cc_wimplicit_fallthrough= ;;
 esac
 fi ;;
 esac
index 9af8d541e596e2f0b0f61dd750df4c02c7c3c3a8..050bfa65e335bc1b5967e513c3327d667223fca3 100644 (file)
@@ -1562,7 +1562,7 @@ LIBC_TRY_CC_AND_TEST_CC_OPTION([for -Wimplicit-fallthrough],
   [-Werror -Wimplicit-fallthrough],
   libc_cv_cc_wimplicit_fallthrough,
   [libc_cv_cc_wimplicit_fallthrough=-Wimplicit-fallthrough],
-  [libc_cv_cc_wimplicit_fallthrough=-Wimplicit-fallthrough],
+  [libc_cv_cc_wimplicit_fallthrough=],
   libc_cv_test_cc_wimplicit_fallthrough,
   [libc_cv_test_cc_wimplicit_fallthrough=-Wimplicit-fallthrough],
   [libc_cv_test_cc_wimplicit_fallthrough=])