在 2025-11-23 07:20, Martin Storsjö 写道:
This silences Clang warnings like this:../math/fmal.c:34:3: warning: packed attribute is unnecessary for 'struct x87reg_::(anonymous at ../math/fmal.c:34:3)' [-Wpacked] No attribute is needed for making these structs keep their intended layout. While Clang did warn about the other cases, it didn't warn about the case in math/frexpl.c being unnecessary - but this one isn't necessary either.
On x86-32 we have: sizeof(double) = 8 alignof(double) = 8 sizeof(long double) = 12 alignof(long double) = 4Because the struct has a `uint64_t` member, the `packed` attribute reduces its alignment from 8 to 4, and removes 4 padding bytes. So it does alter the layout for x86-32; it just doesn't alter the behavior.
The change looks good to me if it can pass the CI. -- Best regards, LIU Hao
OpenPGP_signature.asc
Description: OpenPGP digital signature
_______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
