mirror of
https://github.com/python/cpython.git
synced 2025-09-01 22:47:59 +00:00
gh-116869: Build test_cext with -Werror=declaration-after-statement (#116990)
Make sure that the C API does not emit compiler warnings when built with -Werror=declaration-after-statement.
This commit is contained in:
parent
039d20ae54
commit
5405e9e5b5
2 changed files with 6 additions and 0 deletions
|
@ -1,5 +1,7 @@
|
||||||
# gh-116869: Build a basic C test extension to check that the Python C API
|
# gh-116869: Build a basic C test extension to check that the Python C API
|
||||||
# does not emit C compiler warnings.
|
# does not emit C compiler warnings.
|
||||||
|
#
|
||||||
|
# Python C API must build with -Werror=declaration-after-statement.
|
||||||
|
|
||||||
import os.path
|
import os.path
|
||||||
import shutil
|
import shutil
|
||||||
|
|
|
@ -16,6 +16,10 @@ if not support.MS_WINDOWS:
|
||||||
# The purpose of test_cext extension is to check that building a C
|
# The purpose of test_cext extension is to check that building a C
|
||||||
# extension using the Python C API does not emit C compiler warnings.
|
# extension using the Python C API does not emit C compiler warnings.
|
||||||
'-Werror',
|
'-Werror',
|
||||||
|
|
||||||
|
# gh-116869: The Python C API must build with
|
||||||
|
# -Werror=declaration-after-statement.
|
||||||
|
'-Werror=declaration-after-statement',
|
||||||
]
|
]
|
||||||
else:
|
else:
|
||||||
# Don't pass any compiler flag to MSVC
|
# Don't pass any compiler flag to MSVC
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue