<div dir="ltr"><div><br></div><div>On Mon, Dec 21, 2015 at 9:22 PM, Chandler Carruth <<a href="mailto:chandlerc@google.com">chandlerc@google.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Relatedly, I think you could require a C++11 implementation to build libc++ itself and merely support C++03 parsing of the headers (and subsequent linking of that object code with the library). That might allow you to maintain a single ABI of the built library even as you switch between C++03 and C++11 usage of the library.</div></blockquote><div><br></div><div><br></div><div>This is the status-quo. You have always needed C++11 to build libc++ and dylib produced is ABI compatible between Clang C++03/C++11 and GCC C++11.</div><div>GCC in C++03 doesn't provide char16_t and char32_t and this causes link errors in locale code.</div><div><br></div><div class="gmail_extra"><div class="gmail_quote"><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">FWIW, for the few users I support who care about C++03 mode, it would actually be a significant feature to turn off all C++11 emulation in libc++ and to present as close to a pure C++03 environment as possible. Those users have *some* environments they support which are functionally C++03 and they are setting the C++03 mode to try and detect problems sooner when building and testing with the nice modern Clang+libc++ (or GCC+libc++) toolchain they have in their main development environment. I wonder if ceasing to emulate so much of C++11 library features (and language features!!! nullptr for example!) when building in C++03 would help with this.</div></blockquote><div><br></div><div><br></div><div>I'm sympathetic to this case for C++11 onward. For newer dialects we provide a mostly conforming implementation. However Libc++ was initially developed to the C++11 standard and meaningful C++03 conformance is not in the cards. We internally depend on C++11 library classes and headers when implementing C++03. This is a fundamental part of the library design and shouldn't be change. (The "#define" nullptr needs to die though).</div><div>If users want to find conformance issues in C++03 mode they should use a library that implements the C++03 spec.</div><div><br></div><div><div>IMO offering C++11 library extensions in C++03 is an important part of libc++ that users depend on.</div><div>My concern is that some of the emulation was never intended to be permanent. Instead it came along with the need to support bad</div><div>C++0x compilers that would some day go away. However C++03 is not going away soon.</div><div>I fear that supporting this emulation in perpetuity is detrimental to the overall maintainability of libc++.</div><div><br></div><div>However much of the "language-emulation" is needless for Clang users because Clang provides the required language features as extensions.</div><div>GCC in C++03 is the only configuration that would continue to need "emulation". Dropping or limiting support for GCC in C++03 might be unrealistic</div></div><div>but it would also be very beneficial to libc++. </div><div><br></div><div>Anyway, I feel I've been too hasty in raising this issue and I don't plan to keep pushing it.</div><div><br></div><div>/Eric</div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div><br></div><div class="gmail_quote"><div><div><div dir="ltr">On Mon, Dec 21, 2015 at 5:32 PM Eric Fiselier via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>> wrote:<br></div></div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div><div><div dir="ltr">I think we have found consensus, or at least mild agreement, that nobody needs libc++ to support GCC 4.6, 4.7 or 4.8.<div>Unless there are any late objections I'm going to proceed with </div><div><br></div><div>* Requiring GCC 4.9+ to use libc++ in C++11 mode.</div><div><br></div><div>While GCC 4.9 may not be optimal for everybody it is a compiler we can meaningfully support.</div><div>Users of GCC 4.9+ should expect no test failures in C++11 mode and I will set up a buildbot to enforce this.</div><div><br></div><div>This new requirement also has an exciting implication: Libc++ no longer has to configure for incomplete C++11 implementations.**</div><div><div>This means that libc++ no longer has to restrict its use of C++11 features such as "constexpr" and alias templates in C++11 mode.</div></div><div><br></div><div>However I still don't know what to do about GCC in C++03 mode, which still has over 600 test failures. But that is a separate</div><div>question and deserves it's separate thread. Expect to see a new thread in cfe-dev tonight.</div><div><br></div><div>/Eric</div><div><br></div><div>** I'll triple check this before I act on it.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Dec 21, 2015 at 4:49 PM, Eric Fiselier <span dir="ltr"><<a href="mailto:eric@efcs.ca" target="_blank">eric@efcs.ca</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span>On Mon, Dec 21, 2015 at 8:19 AM, Craig, Ben via cfe-dev <span dir="ltr"><<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span>On 12/19/2015 2:44 PM, Renato Golin wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
On 18 December 2015 at 14:30, Craig, Ben via cfe-dev<br>
<<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Ubuntu 12.04 LTS (precise), released Apr-26-2012: GCC 4.6.3<br>
Ubuntu 14.04 LTS (trusty), released Apr-17-2014: GCC 4.8.2<br>
</blockquote>
Previous LTS is deprecated when a new LTS comes along, so no one<br>
should have to worry about 12.04 in this day and age.<br>
<br>
Is there any one that this is important?</blockquote></span></blockquote><div><br></div></span><div>These configurations break enough that I doubt anybody is depending on them. I think I would have seen more bug reports if people were trying to use it.</div><div><br></div><div>This is also the entirely wrong question to ask. What's important is that Libc++ is allowed to required C++11, and C++11 implementation should work. </div><div>People who insist on using a ToT STL with an old compiler puzzle me. You can't expect new library features without additional language support.</div><span><font color="#888888"><div><br></div><div>/Eric</div></font></span></div><br></div></div>
</blockquote></div><br></div></div></div><span>
_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br>
</span></blockquote></div>
</blockquote></div><br></div></div>