From aaeea78b0f8f4c8dfab5cd4eb6fb4c5fe1ee21e2 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Wed, 20 Apr 2022 13:19:05 +0200 Subject: [PATCH] gh-91731: Build Python with -std=c11 (#91733) Python is now built with "-std=c11" compiler option, rather than "-std=c99". --- .../next/Build/2022-04-20-11-14-51.gh-issue-91731.zRoPcJ.rst | 2 ++ configure | 2 +- configure.ac | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 Misc/NEWS.d/next/Build/2022-04-20-11-14-51.gh-issue-91731.zRoPcJ.rst 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 00000000000..92a1f52cbce --- /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 65495194f49..94adc6fdf01 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 276718aeeb7..9b60b98d143 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],