From: Chris Eibl <138194463+chris-eibl@users.noreply.github.com> Date: Thu, 10 Apr 2025 22:17:33 +0000 (+0200) Subject: GH-131296: Suppress "unused label" warning for clang-cl closer to actual occurrence... X-Git-Tag: v3.14.0b1~537 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e5f68fd29b3bd867207f23608a8dbc5759a056ed;p=thirdparty%2FPython%2Fcpython.git GH-131296: Suppress "unused label" warning for clang-cl closer to actual occurrence (GH-131900) --- diff --git a/PCbuild/pyproject-clangcl.props b/PCbuild/pyproject-clangcl.props index a574cf84ee5d..70a81ca7da30 100644 --- a/PCbuild/pyproject-clangcl.props +++ b/PCbuild/pyproject-clangcl.props @@ -46,7 +46,7 @@ Please see GH-131691 for details. --> Async - -Wno-deprecated-non-prototype -Wno-unused-label -Wno-pointer-sign -Wno-incompatible-pointer-types-discards-qualifiers -Wno-unused-function %(AdditionalOptions) + -Wno-pointer-sign -Wno-incompatible-pointer-types-discards-qualifiers -Wno-unused-function %(AdditionalOptions) -m32 %(AdditionalOptions) -m64 %(AdditionalOptions) -flto=thin %(AdditionalOptions) diff --git a/Python/ceval.c b/Python/ceval.c index 75c25ac87c07..8ab0c6318c1c 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -891,7 +891,7 @@ extern void _PyUOpPrint(const _PyUOpInstruction *uop); if computed gotos aren't used. */ /* TBD - what about other compilers? */ -#if defined(__GNUC__) +#if defined(__GNUC__) || defined(__clang__) # pragma GCC diagnostic push # pragma GCC diagnostic ignored "-Wunused-label" #elif defined(_MSC_VER) /* MS_WINDOWS */ @@ -1179,7 +1179,7 @@ early_exit: # pragma optimize("", on) #endif -#if defined(__GNUC__) +#if defined(__GNUC__) || defined(__clang__) # pragma GCC diagnostic pop #elif defined(_MSC_VER) /* MS_WINDOWS */ # pragma warning(pop)