diff options
author | Victor Stinner <vstinner@python.org> | 2022-05-03 20:47:29 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-03 20:47:29 +0200 |
commit | ff3e9cdf334737aeedbbec2e5a219084d27db9cd (patch) | |
tree | 2ad9f899f486c03929282a520cb0a6f538447132 /Lib/test/test_cppext.py | |
parent | b270b82f1137ff25ee263eafd31503d760f3403d (diff) | |
download | cpython-ff3e9cdf334737aeedbbec2e5a219084d27db9cd.tar.gz cpython-ff3e9cdf334737aeedbbec2e5a219084d27db9cd.zip |
gh-91320: Fix more old-style cast warnings in C++ (#92247)
Use _Py_CAST(), _Py_STATIC_CAST() and _PyASCIIObject_CAST() in
static inline functions to fix C++ compiler warnings:
"use of old-style cast" (clang -Wold-style-cast).
test_cppext now builds the C++ test extension with -Wold-style-cast.
Diffstat (limited to 'Lib/test/test_cppext.py')
-rw-r--r-- | Lib/test/test_cppext.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_cppext.py b/Lib/test/test_cppext.py index 99f6062d79d..fbb79bb8ac3 100644 --- a/Lib/test/test_cppext.py +++ b/Lib/test/test_cppext.py @@ -27,6 +27,8 @@ if not MS_WINDOWS: # a C++ extension using the Python C API does not emit C++ compiler # warnings '-Werror', + # Warn on old-style cast (C cast) like: (PyObject*)op + '-Wold-style-cast', ] else: # Don't pass any compiler flag to MSVC |