Skip to content

Commit

Permalink
pythongh-120593: Add -Wcast-qual flag to test_cext
Browse files Browse the repository at this point in the history
  • Loading branch information
vstinner committed Jun 27, 2024
1 parent 4999e0b commit 461e3fe
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Lib/test/test_cext/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,14 @@
'-Werror',
]
if not support.Py_GIL_DISABLED:
CFLAGS.append(
CFLAGS.extend((
# gh-116869: The Python C API must be compatible with building
# with the -Werror=declaration-after-statement compiler flag.
'-Werror=declaration-after-statement',
)
'-Wdeclaration-after-statement',

# gh-120593: Check the const qualifier
'-Wcast-qual',
))
else:
# Don't pass any compiler flag to MSVC
CFLAGS = []
Expand Down

0 comments on commit 461e3fe

Please sign in to comment.