[Python-checkins] gh-91731: Build Python with -std=c11 (#91733)

vstinner webhook-mailer at python.org
Wed Apr 20 07:19:14 EDT 2022


https://github.com/python/cpython/commit/aaeea78b0f8f4c8dfab5cd4eb6fb4c5fe1ee21e2
commit: aaeea78b0f8f4c8dfab5cd4eb6fb4c5fe1ee21e2
branch: main
author: Victor Stinner <vstinner at python.org>
committer: vstinner <vstinner at python.org>
date: 2022-04-20T13:19:05+02:00
summary:

gh-91731: Build Python with -std=c11 (#91733)

Python is now built with "-std=c11" compiler option, rather than
"-std=c99".

files:
A Misc/NEWS.d/next/Build/2022-04-20-11-14-51.gh-issue-91731.zRoPcJ.rst
M configure
M configure.ac

diff --git a/Misc/NEWS.d/next/Build/2022-04-20-11-14-51.gh-issue-91731.zRoPcJ.rst b/Misc/NEWS.d/next/Build/2022-04-20-11-14-51.gh-issue-91731.zRoPcJ.rst
new file mode 100644
index 0000000000000..92a1f52cbce4c
--- /dev/null
+++ b/Misc/NEWS.d/next/Build/2022-04-20-11-14-51.gh-issue-91731.zRoPcJ.rst
@@ -0,0 +1,2 @@
+Python is now built with ``-std=c11`` compiler option, rather than
+``-std=c99``. Patch by Victor Stinner.
diff --git a/configure b/configure
index 65495194f4935..94adc6fdf015e 100755
--- a/configure
+++ b/configure
@@ -7871,7 +7871,7 @@ UNIVERSAL_ARCH_FLAGS=
 # tweak BASECFLAGS based on compiler and platform
 case $GCC in
 yes)
-    CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
+    CFLAGS_NODIST="$CFLAGS_NODIST -std=c11"
 
 
 
diff --git a/configure.ac b/configure.ac
index 276718aeeb77a..9b60b98d1434e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1983,7 +1983,7 @@ AC_DEFUN([PY_CHECK_CC_WARNING], [
 # tweak BASECFLAGS based on compiler and platform
 case $GCC in
 yes)
-    CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
+    CFLAGS_NODIST="$CFLAGS_NODIST -std=c11"
 
     PY_CHECK_CC_WARNING([enable], [extra], [if we can add -Wextra])
     AS_VAR_IF([ac_cv_enable_extra_warning], [yes],



More information about the Python-checkins mailing list