You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
configure.ac assumes -std=c11 rather than checking it, which causes make failures on old compilers #131093
Run a container having a gcc that does not support the C11 standard (e.g., gcc 4.4.7)
tar xvJf Python-3.13.2.tar.xz && cd Python-3.13.2
./configure && make
Expected: configure reports an error like "your compiler doesn't support C11"
Observed: configure succeeds, only for make to fail.
...
configure: creating Makefile
configure:
If you want a release build with all stable optimizations active (PGO, etc),
please run ./configure --enable-optimizations
configure: Your compiler or platform does have a working C11 stdatomic.h. A future version of Python may require stdatomic.h.
sh-4.1# make
gcc -std=gnu99 -pthread -c -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall -std=c11 -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration -fvisibility=hidden -I./Include/internal -I./Include/internal/mimalloc -I. -I./Include -DPy_BUILD_CORE -o Programs/python.o ./Programs/python.c
cc1: error: unrecognized command line option "-std=c11"
make: *** [Programs/python.o] Error 1
Suggestion
I think this can be fixed by changing configure.achere:
Activity
picnixz commentedon Mar 12, 2025
PR is welcome!
vstinner commentedon Mar 13, 2025
cc @encukou
pythongh-131093: Enforce -std=c11 for gcc at configure time rather th…
pythongh-131093: Enforce -std=c11 for gcc at configure time rather th…
pythongh-131093: Enforce -std=c11 for gcc at configure time rather th…
pythongh-131093: Enforce -std=c11 for gcc at configure time rather th…