C++11 Compiler Support Shootout -- Alex Korban

C++11 compiler support continues to grow across the industry, with leaders and laggards still all moving in the C++11 direction.

C++11 Compiler Support Shootout: Visual Studio, GCC, Clang, Intel

by Alex Korban

It’s been more than half a year since my last comparison of the C++11 support across different compilers. This time I’d like to see how different compilers stack up based on the documentation for the pre-release versions of these compilers.

The next release of GCC is 4.8 and the upcoming version of Clang is 3.3. If you use Visual Studio 2012, you can install an experimental CTP update released in November 2012 to get additional C++11 features.

...

Add a Comment

Comments are closed.

Comments (7)

0 0

alexo said on Mar 14, 2013 03:36 PM:

The VS2012 column includes the November CTP which is, by Microsoft's own admission, "alpha quality" and also " is a Customer Technology Preview and does not come with a ‘Go Live’ license".

Since one cannot use the CTP features in production and there is no ETA on the final version, it's inclusion is misleading.
0 0

Alex Korban said on Mar 15, 2013 01:22 AM:

I specifically said in the post this is a comparison of pre-release compilers. I did it because it's useful to look at what's going to be available in the near future. If you'd like to see a comparison of released compilers, you can check out this post: http://cpprocks.com/a-comparison-of-c11-language-support-in-vs2012-g-4-7-and-clang-3-1/
1 0

Richard Smith said on Mar 18, 2013 02:45 PM:

Errata:

Clang is listed as "Partial" for "generalized attributes" when its implementation is complete.
Clang is listed as "Partial" for "C99 attributes" but GCC is listed as "Yes"; both implementations have implemented the same parts (neither treats __int128 as an extended integral type), so these should be the same.
Clang and GCC are listed as "No" for "minimal support for garbage collection" when no compiler changes are needed for this feature. Should this be moved to the library section?
0 0

Alex Korban said on Mar 18, 2013 03:57 PM:

Richard, thanks for pointing these things out.

1) Clang's documentation states that [[carries_dependency]] attribute is ignored, which is why I listed it as Partial. GCC's C++11 page lists no caveats but perhaps it also ignores this attribute.
2) I've changed GCC's C99 support to Partial.
3) I've moved the garbage collection item to the library section - that makes sense.
0 0

Richard Smith said on Mar 18, 2013 04:25 PM:

GCC ignores both [[carries_dependency]] and [[noreturn]], with a warning. Clang's behavior with [[carries_dependency]] is conforming. Thanks for the updates!
0 0

Alex Korban said on Mar 18, 2013 04:39 PM:

I've looked into it a bit further, and I've updated Clang's support for attributes to Yes. Thanks for the information.
0 0

David I said on Mar 20, 2013 03:07 PM:

Alex - at Embarcadero Technologies we have the first (and only I think) Clang v3.1 Windows 64-bit Compiler shipping as part of C++Builder XE3. I have a blog post that lists what works in our C++ 32-bit Windows (our old school C++ compiler) and C++ 64-bit Windows compilers (clang based). You can find the C++11 support list on my blog at http://blogs.embarcadero.com/davidi/2012/12/23/42211

While you might not add it to your comparison, everyone can access the latest list on my blog. Our compiler team is working on support for Clang v3.2 and beyond. We will continue to publish our results as we move forward with Clang. We are very happy to be part of the Clang and LLVM community. Some of our team members were are the Clang meeting in San Jose last November. We will also have some compiler team members at the Europe Clang meeting in Paris next month.

Some of you might also be interested in the Windows and Agile language extensions we added to Clang v3.1. You can find the list on my blog at
http://blogs.embarcadero.com/davidi/2012/12/14/42144

The C++Builder XE3 free trial download is available including the new C++Builder 64-bit compiler. Trial downloads are available at https://downloads.embarcadero.com/free/c_builder

Happy C++11!

David Intersimone "David I"
blogs.embarcadero.com/davidi/