https://github.com/python/cpython/commit/ef28f6df42c916b058ed14275fb1ceba63ede28e
commit: ef28f6df42c916b058ed14275fb1ceba63ede28e
branch: main
author: Nate Ohlson <[email protected]>
committer: corona10 <[email protected]>
date: 2024-06-26T10:21:21Z
summary:

gh-121040: Remove fallthrough warnings compiler option (gh-121041)

Remove fallthrough warnings

files:
M configure
M configure.ac

diff --git a/configure b/configure
index e61acca55aa637..527bb0bfb1fa0e 100755
--- a/configure
+++ b/configure
@@ -9607,45 +9607,6 @@ fi
 
 # Enable flags that warn and protect for potential security vulnerabilities.
 # These flags should be enabled by default for all builds.
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler 
accepts -Wimplicit-fallthrough" >&5
-printf %s "checking whether C compiler accepts -Wimplicit-fallthrough... " 
>&6; }
-if test ${ax_cv_check_cflags__Werror__Wimplicit_fallthrough+y}
-then :
-  printf %s "(cached) " >&6
-else $as_nop
-
-  ax_check_save_flags=$CFLAGS
-  CFLAGS="$CFLAGS -Werror -Wimplicit-fallthrough"
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main (void)
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
-  ax_cv_check_cflags__Werror__Wimplicit_fallthrough=yes
-else $as_nop
-  ax_cv_check_cflags__Werror__Wimplicit_fallthrough=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-  CFLAGS=$ax_check_save_flags
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: 
$ax_cv_check_cflags__Werror__Wimplicit_fallthrough" >&5
-printf "%s\n" "$ax_cv_check_cflags__Werror__Wimplicit_fallthrough" >&6; }
-if test "x$ax_cv_check_cflags__Werror__Wimplicit_fallthrough" = xyes
-then :
-  BASECFLAGS="$BASECFLAGS -Wimplicit-fallthrough"
-else $as_nop
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: 
-Wimplicit-fallthrough not supported" >&5
-printf "%s\n" "$as_me: WARNING: -Wimplicit-fallthrough not supported" >&2;}
-fi
-
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler 
accepts -fstack-protector-strong" >&5
 printf %s "checking whether C compiler accepts -fstack-protector-strong... " 
>&6; }
 if test ${ax_cv_check_cflags__Werror__fstack_protector_strong+y}
diff --git a/configure.ac b/configure.ac
index 33dee0a9bf4259..9b8ab706ae5ba9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2453,7 +2453,6 @@ AS_VAR_IF([with_strict_overflow], [yes],
 
 # Enable flags that warn and protect for potential security vulnerabilities.
 # These flags should be enabled by default for all builds.
-AX_CHECK_COMPILE_FLAG([-Wimplicit-fallthrough], [BASECFLAGS="$BASECFLAGS 
-Wimplicit-fallthrough"], [AC_MSG_WARN([-Wimplicit-fallthrough not 
supported])], [-Werror])
 AX_CHECK_COMPILE_FLAG([-fstack-protector-strong], [BASECFLAGS="$BASECFLAGS 
-fstack-protector-strong"], [AC_MSG_WARN([-fstack-protector-strong not 
supported])], [-Werror])
 AX_CHECK_COMPILE_FLAG([-Wtrampolines], [BASECFLAGS="$BASECFLAGS 
-Wtrampolines"], [AC_MSG_WARN([-Wtrampolines not supported])], [-Werror])
 

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]

Reply via email to