[clang] [C++17] Support __GCC_[CON|DE]STRUCTIVE_SIZE (PR #89446)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 22 04:41:51 PDT 2024


AaronBallman wrote:

> @AaronBallman Did you read https://discourse.llvm.org/t/rfc-c-17-hardware-constructive-destructive-interference-size/48674/42 ? I want to make sure we do abide by it and it's unclear a consensus was ever formed or called

Yes, I looked at the thread and while there are very valid criticisms of what was standardized, the end result is still that we need this support 1) for Clang to support libc++ implementing a C++17 feature for conformance reasons and 2) for GCC compatibility (re: the macros that are exposed). We can either let libc++ solve this problem entirely on their own and not aim for GCC compatibility here, or we can bite the bullet and do our best. Given that GCC exposes these macros, I think it makes more sense for Clang to predefine them than for libc++ to try to do this from their end.

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


More information about the cfe-commits mailing list