[PATCH] configure: Clear libc_cv_cc_wimplicit_fallthrough if not supported

H.J. Lu hjl.tools@gmail.com
Thu Jan 9 23:14:11 GMT 2025


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>
---
 configure    | 2 +-
 configure.ac | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index b410ee4bd9..eb8abd0054 100755
--- 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
diff --git a/configure.ac b/configure.ac
index 9af8d541e5..050bfa65e3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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=])
-- 
2.47.1



More information about the Libc-alpha mailing list