[clang] [Clang] Implement P2843R3 - Preprocessing is never undefined (PR #192073)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 22 08:22:38 PDT 2026


AaronBallman wrote:

> The opinion of WG21 seems to be that because they made it IFNDR it doesn't matter what we do (and they don't seem bother by making a lot of C++ programs ifndr)
> 
> So i think the cautious approach here is to walk back any change we made to `defined` - ie keep warning by default, which is silenced in system headers.

I think that approach makes sense.

> @AaronBallman do warning-as-error get silenced? I don't recall but that might be a good solution

They do: https://godbolt.org/z/Gdrc9x6Ge but I think this case we should just warn rather than default to an error. WDYT?

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


More information about the cfe-commits mailing list