Skip to content

Commit 461e3fe

Browse files
committed
pythongh-120593: Add -Wcast-qual flag to test_cext
1 parent 4999e0b commit 461e3fe

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

Lib/test/test_cext/setup.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,14 @@
1919
'-Werror',
2020
]
2121
if not support.Py_GIL_DISABLED:
22-
CFLAGS.append(
22+
CFLAGS.extend((
2323
# gh-116869: The Python C API must be compatible with building
2424
# with the -Werror=declaration-after-statement compiler flag.
25-
'-Werror=declaration-after-statement',
26-
)
25+
'-Wdeclaration-after-statement',
26+
27+
# gh-120593: Check the const qualifier
28+
'-Wcast-qual',
29+
))
2730
else:
2831
# Don't pass any compiler flag to MSVC
2932
CFLAGS = []

0 commit comments

Comments
 (0)