[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 05:05:42 PDT 2024


AaronBallman wrote:

> For SystemZ the correct value is 256.

Thanks! Double-checking: for both constructive and destructive?

> In general I agree it makes sense to look at the GCC implementation as a source of reasonable values. Also, I think there probably should be no generic default value at all - it there is no platform-specific value known, it seems better to not define those values rather than define them to some incorrect value ...

On the one hand, I agree. But then libc++ will still have to pick default values to expose (these are `constexpr size_t` variables in libc++ rather than macros or `std::optional` values), so that just moves the problem elsewhere. Also, as best I can tell, that doesn't seem to be how GCC behaves (at least, from trying various GCC flavors on Compiler Explorer).

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


More information about the cfe-commits mailing list