-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
GH-131296: move suppression of "unused label" warning for clang-cl on Windows #131900
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
from global pyproject-clangcl.props to ceval.c
@@ -898,7 +898,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__) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On Windows, clang-cl does not define __GNUC__
(in contrast to Linux), so let's add __clang__
here.
Slightly further down, for MSVC the same warning (4102) is suppressed using #pragma warning(disable:4102)
, which clang-cl unfortunately does not understand (yet).
The only occurrences of this warning in the whole code base stem from "generated_cases.c.h"
, so this is a better place to suppress it in case of clang-cl, instead of doing it globally via pyproject-clangcl.props
.
@@ -46,7 +46,7 @@ | |||
Please see GH-131691 for details. | |||
--> | |||
<ExceptionHandling>Async</ExceptionHandling> | |||
<AdditionalOptions>-Wno-deprecated-non-prototype -Wno-unused-label -Wno-pointer-sign -Wno-incompatible-pointer-types-discards-qualifiers -Wno-unused-function %(AdditionalOptions)</AdditionalOptions> | |||
<AdditionalOptions>-Wno-pointer-sign -Wno-incompatible-pointer-types-discards-qualifiers -Wno-unused-function %(AdditionalOptions)</AdditionalOptions> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-Wno-unused-label
is moved to ceval.c
.
-Wno-deprecated-non-prototype
is removed, because it does not "fire" for the whole code base.
Failing of |
I'm busy right now but from the brief look I did, it seems homebrew changed the directory of where clang 19 is installed. I can only fix it tomorrow, but if you want to take a try you can fix the directory in the CI file today #131895 (comment) |
|
…to actual occurrence (pythonGH-131900)
I think this is a skip news?