Uh oh!
There was an error while loading. Please reload this page.
gh-135183: Suppress MSVC warning 5274 locally - #135184
Conversation
zooba
commented
Jun 5, 2025
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? |
encukou
commented
Jun 5, 2025
We want core devs to use
AFAICS, it's not about syntax changes. MSVC 17.9 vs. older versions produce different ABI for |
encukou
commented
Jun 5, 2025
It might be clearer with the example from the MS docs: structOuter
{
_Alignas(32) structInner { inti; } member1;
structInnermember2;
};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. |
zooba
commented
Jun 5, 2025
Then suppressing the warning isn't the way, and we should be removing/changing |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
encukou
commented
Jun 6, 2025
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 <vstinner@python.org>
encukou
commented
Jun 6, 2025
See also #135209, for a possible bigger change to |
zooba
commented
Jun 6, 2025
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.