From dad44389f2f96523080e3b105eee1b1ab8b19722 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Fri, 10 Jan 2025 07:09:16 +0800 Subject: [PATCH] configure: Clear libc_cv_cc_wimplicit_fallthrough if not supported 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 Reviewed-by: Sam James --- 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=])