[clang] [clang] Stub out gcc_struct attribute (PR #71148)

Martin Storsjö via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 29 13:27:52 PST 2023


mstorsjo wrote:

> Okay, @mstorsjo @MaskRay, what is the way forward?

I'm totally not authoritative for these things, but...

> Am I right that, as for the user-facing changes, `[[gcc_struct]]` cancelling implicit `-mms-bitfilds` on MinGW is fine

Sounds quite fine for me

> and silently ignoring `-m{no-}ms-bitfields` on `windows-msvc` is not?

Silently ignoring options is clearly not good IMO, so either we warn about them or implement them

> Should we (and if yes, when exactly) disallow `-m{no-,}ms-bitfields`? Should the aforementioned `--target=x86_64-pc-windows-msvc -fc++-abi=itanium -mms-bitfields` be accepted?

FWIW I wasn't even aware that it was possible to pick a nondefault C++ ABI, so I don't have a strong opinion on this matter. If it works and doesn't create inconsistencies, then I don't mind, but I guess the regular Clang maintainers have more of a final say on that.

> Is it fine to provide `[[gcc_struct]]` on MSVC because of the reasons I outlined before?

I would be totally fine with that.

https://github.com/llvm/llvm-project/pull/71148


More information about the cfe-commits mailing list