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 <hjl.tools@gmail.com>
Reviewed-by: Sam James <sam@gentoo.org>
This commit is contained in:
H.J. Lu 2025-01-10 07:09:16 +08:00
parent d1da011118
commit dad44389f2
2 changed files with 2 additions and 2 deletions

2
configure vendored
View File

@ -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

View 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=])