[cfe-dev] libc++ supporting older compilers

Eric Fiselier via cfe-dev cfe-dev at lists.llvm.org
Fri Dec 18 15:22:24 PST 2015


Looking at the test-suite results I would say we have trouble supporting
pre-4.9. But GCC 4.7 and 4.8 are bad implementations of C++11.
GCC 4.9 just works.

Libc++ 3.8 should require GCC 4.9 or newer because that's what it actually
needs. A C++11 feature complete compiler.

Below is a summary of how each GCC version does against the test-suite:

C++11 Test Suite Results
----------------------------------------
GCC        | Passes   | Failures
----------------------------------------
4.6          | 719           | 4212
4.7          | 4661         | 126
4.8          | 4015         | 772
4.9          | 4775         | 12  * 10 are missing "is_trivially_" type
traits
5.3          | 4787         | 2
6.0          | 4787         | 2
--------------------------------------
Clang 3.2 | 4786         | 3

I don't want to claim support for 4.7 or 4.8 unless It's tested regularly
and the test-suite passes and that involves fixing hundreds of failures.
Some of the failures are due to mis-configuration. However a significant
amount are caused compiler bugs.
"Fixing" these will involve taking good C++11 and replacing it with w/e the
bad compiler accepts.
Unless people absolutely *need* this I would be hesitant to do it.

C++11 support is only half the story. Even with GCC 4.9 there are 600
failures in C++03 mode.
Libc++ depends on C++11 extensions in C++03 mode but GCC doesn't provide
these.
Does libc++ need to support GCC in C++03 mode?

C++03 | Passes     | Failures
-------------------------------------------
4.6      | 4007         | 648
6.0      | 4029         | 628

I'm not trying to artificially limit support but I am trying to keep it
moving forward. With limited resources
I want to focus on support for C++1z and new libraries like filesystem.
Most libc++ users use clang,
and clang gave us full C++11 support in 3.0.It's time we demand it from
other compilers.

The full results of the runs can be found here:
http://efcs.ca/libcxx/gcc-46-cxx03.txt
http://efcs.ca/libcxx/gcc-46-cxx0x.txt
http://efcs.ca/libcxx/gcc-47-cxx11.txt
http://efcs.ca/libcxx/gcc-48-cxx11.txt
http://efcs.ca/libcxx/gcc-49-cxx11.txt

On Fri, Dec 18, 2015 at 9:06 AM, Craig, Ben via cfe-dev <
cfe-dev at lists.llvm.org> wrote:

> Is there one specific feature though?  Here's the list of features and
> releases: https://gcc.gnu.org/projects/cxx0x.html
> The thing that looks the most inconvenient to work around in 4.6 vs. 4.7
> would probably be template aliases, and even that doesn't seem too horrible
> for c++03.
> Going from 4.6 to 4.5 would result in the loss of nullptr and constexpr,
> and I can see those causing a heavy burden.
> If you go the other direction though, you could argue that 4.8 would be
> beneficial, as then you get access to TLS.
>
>
> On 12/18/2015 9:56 AM, Joerg Sonnenberger via cfe-dev wrote:
>
>> On Fri, Dec 18, 2015 at 08:30:26AM -0600, Craig, Ben via cfe-dev wrote:
>>
>>> This isn't exactly the question that is being asked, but why GCC 4.7?
>>>
>> Lack of many C++ language features before GCC 4.7 is quite neutering.
>>
>> Joerg
>> _______________________________________________
>> cfe-dev mailing list
>> cfe-dev at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>>
>
> --
> Employee of Qualcomm Innovation Center, Inc.
> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux
> Foundation Collaborative Project
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20151218/2b5ede93/attachment.html>


More information about the cfe-dev mailing list