AaronBallman wrote:

> > So I take it we decided not to enable it by default in `-fms-compatibility` 
> > mode then?
> 
> I don't believe it is appropriate to do so. The intent of this warning is to 
> indicate MSVC compatibility issues when building in non-ms-compatibility 
> modes. The existing padding warnings already trigger for these layouts in the 
> relevant ms compatibility modes

We don't typically add new off-by-default warnings though; users don't enable 
them often enough to be worth the costs. My thought process is: if we enable 
this diagnostic by default in `-fms-compatibility` mode as telling the user 
their bit-fields aren't packing, then it's on by default for some 
configurations so it meets our bar for inclusion, and it helps us directly 
because we have Windows precommit (and post-commit) CI coverage for building 
Clang and LLVM. Users on other platforms can opt-in to the diagnostic if they 
want the diagnostics for compatibility reasons.

If we want to leave it off by default, then I wonder if we want to roll the 
functionality into `-Wpadded-bitfield` which already exists and is off by 
default.

https://github.com/llvm/llvm-project/pull/117428
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to