<div dir="ltr">I've sent a patch that explicitly disables G++03.<div><br></div><div><a href="https://reviews.llvm.org/D63154">https://reviews.llvm.org/D63154</a><br><br>Lets try to get it landed.<br><br>/Eric</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jun 11, 2019 at 2:07 PM Eric Fiselier <<a href="mailto:eric@efcs.ca">eric@efcs.ca</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jun 11, 2019 at 12:43 PM Louis Dionne <<a href="mailto:ldionne@apple.com" target="_blank">ldionne@apple.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><br><div><br><blockquote type="cite"><div>On Jun 10, 2019, at 16:37, Eric Fiselier via libcxx-dev <<a href="mailto:libcxx-dev@lists.llvm.org" target="_blank">libcxx-dev@lists.llvm.org</a>> wrote:</div><br class="gmail-m_-7326154376746970852gmail-m_5199905330855348151Apple-interchange-newline"><div><div dir="ltr"><div class="gmail-m_-7326154376746970852gmail-m_5199905330855348151gmail-gs" style="margin:0px;padding:0px 0px 20px;width:1264px;font-family:Roboto,RobotoDraft,Helvetica,Arial,sans-serif;font-size:inherit"><div class="gmail-m_-7326154376746970852gmail-m_5199905330855348151gmail-"><div id="gmail-m_-7326154376746970852gmail-m_5199905330855348151gmail-:178" class="gmail-m_-7326154376746970852gmail-m_5199905330855348151gmail-gt gmail-m_-7326154376746970852gmail-m_5199905330855348151gmail-ii" style="font-size:12.8px;direction:ltr;margin:8px 0px 0px;padding:0px"><div id="gmail-m_-7326154376746970852gmail-m_5199905330855348151gmail-:177" class="gmail-m_-7326154376746970852gmail-m_5199905330855348151gmail-a3s gmail-m_-7326154376746970852gmail-m_5199905330855348151gmail-aXjCH" style="overflow:hidden;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:small;line-height:1.5;font-family:Arial,Helvetica,sans-serif"><div dir="ltr"><div class="gmail-m_-7326154376746970852gmail-m_5199905330855348151gmail-gs" style="margin:0px;padding:0px 0px 20px;width:1272px;font-family:Roboto,RobotoDraft,Helvetica,Arial,sans-serif;font-size:12px"><div class="gmail-m_-7326154376746970852gmail-m_5199905330855348151gmail-"><div id="gmail-m_-7326154376746970852gmail-m_5199905330855348151gmail-:11u" class="gmail-m_-7326154376746970852gmail-m_5199905330855348151gmail-gt gmail-m_-7326154376746970852gmail-m_5199905330855348151gmail-ii" style="font-size:12.8px;direction:ltr;margin:8px 0px 0px;padding:0px"><div id="gmail-m_-7326154376746970852gmail-m_5199905330855348151gmail-:11v" class="gmail-m_-7326154376746970852gmail-m_5199905330855348151gmail-a3s gmail-m_-7326154376746970852gmail-m_5199905330855348151gmail-aXjCH" style="overflow:hidden;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:small;line-height:1.5;font-family:Arial,Helvetica,sans-serif"><div dir="ltr"><div><span style="font-family:"Lucida Grande","Lucida Sans Unicode",Arial,Verdana,Helvetica,sans-serif">Hello,</span></div><div><span style="font-family:"Lucida Grande","Lucida Sans Unicode",Arial,Verdana,Helvetica,sans-serif"><br></span></div><div><span style="font-family:"Lucida Grande","Lucida Sans Unicode",Arial,Verdana,Helvetica,sans-serif">libc++ claims to support GCC with C++03 ("G++03"), and this is a problem for our users.</span></div><div><br></div><div><font face="Lucida Grande, Lucida Sans Unicode, Arial, Verdana, Helvetica, sans-serif">Our C++03 users are all using Clang. They must be.</font><span style="font-family:"Lucida Grande","Lucida Sans Unicode",Arial,Verdana,Helvetica,sans-serif">  Less than 9% of the C++03 tests pass with GCC [1][2]. No non-trivial C++ program could work.</span><br></div><div><br></div><div><span style="font-family:"Lucida Grande","Lucida Sans Unicode",Arial,Verdana,Helvetica,sans-serif">Attempting to support G++03 impacts our QoI considerably. Unlike Clang, G++03 offers almost no C++11 extensions. If we could remove all the fallbacks for G++03, it would mean libc++ could::</span></div></div></div></div></div></div></div></div></div></div></div></div></div></blockquote><div><br></div><div>I like the general idea and I definitely support dropping support for C++03 under GCC, since it is effectively unsupported today anyway.</div><div><br></div><br><blockquote type="cite"><div><div dir="ltr"><div class="gmail-m_-7326154376746970852gmail-m_5199905330855348151gmail-gs" style="margin:0px;padding:0px 0px 20px;width:1264px;font-family:Roboto,RobotoDraft,Helvetica,Arial,sans-serif;font-size:inherit"><div class="gmail-m_-7326154376746970852gmail-m_5199905330855348151gmail-"><div id="gmail-m_-7326154376746970852gmail-m_5199905330855348151gmail-:178" class="gmail-m_-7326154376746970852gmail-m_5199905330855348151gmail-gt gmail-m_-7326154376746970852gmail-m_5199905330855348151gmail-ii" style="font-size:12.8px;direction:ltr;margin:8px 0px 0px;padding:0px"><div id="gmail-m_-7326154376746970852gmail-m_5199905330855348151gmail-:177" class="gmail-m_-7326154376746970852gmail-m_5199905330855348151gmail-a3s gmail-m_-7326154376746970852gmail-m_5199905330855348151gmail-aXjCH" style="overflow:hidden;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:small;line-height:1.5;font-family:Arial,Helvetica,sans-serif"><div dir="ltr"><div class="gmail-m_-7326154376746970852gmail-m_5199905330855348151gmail-gs" style="margin:0px;padding:0px 0px 20px;width:1272px;font-family:Roboto,RobotoDraft,Helvetica,Arial,sans-serif;font-size:12px"><div class="gmail-m_-7326154376746970852gmail-m_5199905330855348151gmail-"><div id="gmail-m_-7326154376746970852gmail-m_5199905330855348151gmail-:11u" class="gmail-m_-7326154376746970852gmail-m_5199905330855348151gmail-gt gmail-m_-7326154376746970852gmail-m_5199905330855348151gmail-ii" style="font-size:12.8px;direction:ltr;margin:8px 0px 0px;padding:0px"><div id="gmail-m_-7326154376746970852gmail-m_5199905330855348151gmail-:11v" class="gmail-m_-7326154376746970852gmail-m_5199905330855348151gmail-a3s gmail-m_-7326154376746970852gmail-m_5199905330855348151gmail-aXjCH" style="overflow:hidden;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:small;line-height:1.5;font-family:Arial,Helvetica,sans-serif"><div dir="ltr"><div><div>* Improve Correctness:</div></div><div><br></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><div>Every `#ifdef _LIBCPP_HAS_NO_<C++11-feature>` is a bug manifest. It exists to admit for deviant semantics.</div></div><div><br></div></blockquote><div><div>* Achieve ABI stability between C++03 and C++11</div></div><div><br></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><div>Differences between our C++03 and C++Rest branches contain ABI bugs. For example `std::nullptr_t` and `std::function::operator()(...)` are currently incompatible between C++11 and C++03, but could be fixed.</div></div></blockquote></div></div></div></div></div></div></div></div></div></div></div></div></blockquote><div><br></div>I'd like to echo what some people said regarding breaking ABI here. Instead of breaking the ABI for C++11 extensions in C++03, we could also remove them altogether. This would be a larger change that would require a deprecation period for those extensions, but it might be worth it and it would be safer than an ABI break (because source breaks are compile-time). We could:</div><div><br></div></div></blockquote><div><br></div><div>The ABI break is optional.  But this option is only available to us after we drop G++03.</div><div>We can choose to fix these ABI bugs, or we can choose to keep the ABI stable.</div><div><br></div><div>Let's couch the discussion of how to fix these bugs for now.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div></div><div>1. Introduce a switch that removes C++11 extensions in C++03</div><div>2. Somehow flag the use of these extensions, asking users to move to C++11 or use alternatives</div><div>3. After some time, toggle the switch to ON by default, removing the extensions</div><div>4. After some time, remove the switch altogether</div><div>5. Get rid of the C++11 extensions in C++03, which are now unused</div><div><br></div><div>This hinges on the feasibility of users actually moving to C++11 or using alternatives, and most importantly the number of impacted users. If there's interest, it would be possible to survey large some code bases to get a sense for these numbers and the feasibility of my plan.</div><div><br></div><div>Eric, WDYT?</div></div></blockquote><div><br></div><div>libc++ is a C++11 implementation of the standard library. We should be envisioning a future without C++03 support.</div><div><br></div><div>If a C++11 extension has cost to implement, decreases QoI, doesn't have existing users, or does not provide real benefit,</div><div>then we should consider dropping it. Some extensions I think we should remove (on a reasonable timeline):</div><div><br></div><div>* `std::function`: I doubt it has many C++03 users, and we don't really need it internally.<br></div><div>* `<future>`: It's a shell of the actual thing in C++03. I doubt there are users.</div><div><br></div><div>We can have a lot of really nice things for libc++ once we take the initial step of dropping G++03.</div><div><br></div><div>/Eric</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div><br></div><div>Either way, I would try to dissociate the two projects of dropping support for GCC/C++03 AND taking advantage of the freedom that gives us.</div><div><br></div><div>Louis</div><div><br></div></div></blockquote></div></div>
</blockquote></div>