[clang] [Clang] Support libstdc++ workarounds when using `-E` (PR #210802)

via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 23 08:51:30 PDT 2026


Sirraide wrote:

> Right, Sirraide did not inject `__GLIBCXX__` as a predefined macro, and as we generalize we should keep not adding these non-macros to the preprocessor state. they are _only_ observed by the bits of clang that have workaround / logic based on them being defined. Further erroring on any identifier we don't recognize makes sense to me

@cor3ntin To clarify, are you suggesting that the pragma _should_ define `__GLIBCXX__` (and potential other such macros) as a macro, or that it _shouldn’t_ and should instead only update some other preprocessor state that is not directly related to macro expansion?

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


More information about the cfe-commits mailing list