[PATCH] D13828: Do not process __config file in C mode
Eric Fiselier via llvm-commits
llvm-commits at lists.llvm.org
Sat Oct 17 00:11:27 PDT 2015
EricWF added a comment.
In http://reviews.llvm.org/D13828#269565, @rsmith wrote:
> In http://reviews.llvm.org/D13828#269391, @EricWF wrote:
>
> > if `__config` is first included within an `extern "C"` it will define the header guard macro but nothing else
>
>
> That's not how this macro works: the `__cplusplus` macro is not affected by `extern "C"`; it will be defined for all C++ compilations, whether or not we're in an `extern "C"` context. Personally, I'm sympathetic to coping with libc++'s headers being present in C compilations; it may be hard to avoid this in some circumstances, with some build tools.
@aizatsky I'm sorry I think I got this wrong. I'm commit a patch similar to this after I audit how our C headers use `<__config>`. I think we can fix your issues with minimal pain to libc++.. However i'm not really happy having to worry about C compatibility.
http://reviews.llvm.org/D13828
More information about the llvm-commits
mailing list