<div dir="ltr">> <span style="font-size:12.8px">It is my understanding that libc++ is fully C++03 compatible. Or is this not the case? (I couldn't find this fact explicitly documented on</span><span style="font-size:12.8px"> </span><a href="http://libcxx.llvm.org/" target="_blank" style="font-size:12.8px">libcxx.llvm.org</a><span style="font-size:12.8px">).</span><div><br></div><div><span style="font-size:12.8px">We don't provide a  conforming C++03 mode.</span><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">Libc++ uses the C++11  as its base document. C++03 support is really just the C++11 STL without C++11 language features.</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">> </span><span style="font-size:12.8px">If the underlying C-library does not provide those C99 functions (as expected for -std=C++03), this usage will result in a compiler error.</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">That's problematic. If a header exists in C++03 then users should be able to include it without error in C++03.</span></div><div><span style="font-size:12.8px">If certain C libraries require extra guards around C99 declarations then we should support that.</span></div><div><span style="font-size:12.8px">However most C libraries provide the C99 extensions in C++03 and libc++ should continue to provide them as well.</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">> </span><span style="font-size:12.8px"> </span><span style="font-size:12.8px">Do we need to be more lenient with libc++?</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">Probably not. I think we should fix libc++ to support strict C library implementations.</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">> </span><span style="font-size:12.8px">Or is this a regression from D12747?</span></div><div><br></div><div>I don't think it's a regression because we never provided strict C++03 conformance.</div><div><br></div><div>> <span style="font-size:12.8px">If there is a common senses on this, I'd like to at least document in on</span><span style="font-size:12.8px"> </span><a href="http://libcxx.llvm.org/" target="_blank" style="font-size:12.8px">libcxx.llvm.org</a><span style="font-size:12.8px">.</span></div><div><br></div><div><span style="font-size:12.8px">Agreed. I'll work on creating some docs.</span></div><div><br></div><div><span style="font-size:12.8px">/Eric</span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Aug 25, 2016 at 8:47 AM, Asiri Rathnayake <span dir="ltr"><<a href="mailto:asiri.rathnayake@gmail.com" target="_blank">asiri.rathnayake@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi All,<div><br></div><div>I've got a couple of questions:<div><br></div><div>It is my understanding that libc++ is fully C++03 compatible. Or is this not the case? (I couldn't find this fact explicitly documented on <a href="http://libcxx.llvm.org" target="_blank">libcxx.llvm.org</a>).</div><div><br></div><div>Following the split of <cfoo> headers into <cfoo> and <foo.h> headers in [1], any compilation including <foo.h> will end up picking the libc++ header instead of directly including the underlying C library's <foo.h> header. This can be a bit problematic for -std=c++03 in some cases. For example, <math.h> header provided by libc++ makes references C99 math functions unconditionally, which is OK for -std=c++11 and beyond, but not OK for -std=c++03. If the underlying C-library does not provide those C99 functions (as expected for -std=C++03), this usage will result in a compiler error.</div><div><br></div><div>Am I missing something here? We have a C library which is quite strict about standards conformance (e.g. it won't make C99 math functions visible if being used under -std=c++03). Do we need to be more lenient with libc++? Or is this a regression from D12747?</div><div><br></div><div>If there is a common senses on this, I'd like to at least document in on <a href="http://libcxx.llvm.org" target="_blank">libcxx.llvm.org</a>.</div><div><br></div><div>Thanks.</div><div><br></div><div>/ Asiri</div><div><br></div><div>[1] <a href="https://reviews.llvm.org/D12747" target="_blank">https://reviews.llvm.org/<wbr>D12747</a></div></div></div>
</blockquote></div><br></div>