-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
gh-135183: Suppress MSVC warning 5274 locally #135184
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
base: main
Are you sure you want to change the base?
Conversation
Why? The suppression was restricted to our headers, which is local enough. It's only warning about changed behaviour from the old syntax, which we never used. Are we going to replicate the same suppression code every time it gets used? |
We want core devs to use
AFAICS, it's not about syntax changes. MSVC 17.9 vs. older versions produce different ABI for |
It might be clearer with the example from the MS docs: struct Outer
{
_Alignas(32) struct Inner { int i; } member1;
struct Inner member2;
}; The layout of this structure is different depending on what version of MSVC you compile with. We do not want to define such a struct in our headers.
Yes. |
Then suppressing the warning isn't the way, and we should be removing/changing |
I think suppressing is the way. Once you (as a core dev) confirm that you're not defining such a struct, add the suppression. Hm, maybe I wasn't clear here:
By “it” I mean the suppression code, not ... which suggests another possible workaround here: define the struct for
Well, you're the expert on that :) |
Co-authored-by: Victor Stinner <[email protected]>
See also #135209, for a possible bigger change to |
I like the other change better. Including the type and the alignment as arguments to the macro should be easier to support long-term. |
Uh oh!
There was an error while loading. Please reload this page.