[libcxx-commits] [libcxx] [libc++] Enable availability based on the compiler instead of __has_extension (PR #84065)

Nikolas Klauser via libcxx-commits libcxx-commits at lists.llvm.org
Wed Mar 6 09:10:55 PST 2024


philnik777 wrote:

> I was surprised at how recently it was added to GCC, but what did surprise me was that the behavior was consistent between `-pedantic-errors` and `-pedantic -Werror`.

Do you mean compared to clang?

> Regardless, if we change behavior in Clang, we should be sure to coordinate with the GCC developers so they're aware of the changes.

Absolutely.

It seems we agree that something should change. Now the question is: what should change? Should we try to find all the possible ways to write `-pedantic-errors` and make `__has_extension` change behaviour based on that? Should `__has_extension` not be influenced by `-pedantic-errors`? Something I didn't think of yet?


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


More information about the libcxx-commits mailing list