From 003e6d2b9776c07147a9c628eb028fd2ac3f0008 Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Fri, 28 Feb 2025 16:03:02 +0100 Subject: gh-129666: Add C11/C++11 to docs and `-pedantic-errors` to GCC/clang test_c[pp]ext tests (GH-130686) --- Lib/test/test_cppext/setup.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Lib/test/test_cppext/setup.py') diff --git a/Lib/test/test_cppext/setup.py b/Lib/test/test_cppext/setup.py index 019ff18446a..aa09c7bc8cb 100644 --- a/Lib/test/test_cppext/setup.py +++ b/Lib/test/test_cppext/setup.py @@ -18,6 +18,14 @@ if not support.MS_WINDOWS: # a C++ extension using the Python C API does not emit C++ compiler # warnings '-Werror', + + # Ask for strict(er) compliance with the standard. + '-pedantic-errors', + + # But allow C++11 features for -std=C++03. We use: + # - `long long` (-Wno-c++11-long-long) + # - comma at end of `enum` lists (no narrower GCC option exists) + '-Wno-c++11-extensions', ] else: # MSVC compiler flags -- cgit v1.2.3