ojhunt wrote: > My primary questions here are are: > > * Do we want to put this under `-fclang-abi-compat=`?
As something to provide an override to opt out of or to opt into? Given the purpose of ms_struct is to match MSVC it seems reasonable to assume that people do expect this? e.g the default being to enable On the other hand I can imagine people writing this code using attributes that are ignored under msvc so the packing doesn't happen anyway? > * Do any platforms want to opt-out of this? > > CC @jmorse @ahatanak for the platforms that tend to want opt-outs for this > sort of change. > > If I'm understanding correctly, this is specifically about the interaction > between `__attribute((packed))` and `__attribute((ms_struct))` on non-MS > platforms. MS targets use a different codepath, and this doesn't affect > `#pragma pack`. Brief testing shows this is compatible with gcc, and it's > compatible with clang in MS layout mode, and it's closer to the way MSVC > handles `#pragma pack`. So that all seems fine. I also did a bunch of behavior comparisons (before I successfully actually read the existing comments :D) and this seems to be an improvement on all fronts. https://github.com/llvm/llvm-project/pull/182792 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
