[clang] [Headers] Don't declare unreachable() from stddef.h in C++ (PR #86748)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 1 10:18:46 PDT 2024


AaronBallman wrote:

FWIW, I did verify that it's very unlikely the changes in this PR will break existing code: https://sourcegraph.com/search?q=context:global+__need_unreachable+-file:.*clang.*&patternType=keyword&sm=0, so that's a good thing.

> I do wonder if we could have the broader builtin headers discussion independent of this patch? Is everyone happy with this patch? We can keep talking about the builtin headers in here independent of merging right?

I guess I don't see these as independent topics; if we decide that C++ mode should not have observable differences in C headers, then the changes here are incorrect. I think we should have this discussion in a broader context (like Discourse) before moving forward with these changes.

Also, I'd still like an explanation for [this question](https://github.com/llvm/llvm-project/pull/86748#issuecomment-2023145043):

> I don't understand why this is making into C++ builds at all:

because it may turn out we don't need these changes in the first place because the issue is elsewhere.

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


More information about the cfe-commits mailing list