LLVM's Clang 3.1 Compiler Betters C11, C++11

Posted by Michael Larabel on May 06, 2012

There's only about one week left until LLVM 3.1 will be released and with that will come the 3.1 release of the Clang C/C++ compiler. While we have previously looked at some of the LLVM 3.1 changes, here's a quick look at some of the Clang-specific compiler C11/C++11 improvements.

C11: For C11 language coverage, Clang 3.1 now supports anonymous structs and anonymous unions from this latest ISO C standard. Support for the C11 language standard with Clang is available via the -std=c11 compiler switch.

C++11: When it comes to the C++11 language support within Clang, the 3.1 version provides production-quality support for generalized constant expressions, lambda expressions, generalized initializers, unrestricted unions, user-defined literals, forward-declared enumerations, and atomics.

Objective-C: The Clang 3.1 release for Objective-C now has format string checking for NSString literals.

Aside from the language support improvements, there's also new and better diagnostics support, tooling support, and more, as will be talked about in future Phoronix articles. For those curious about the LLVM/Clang 3.1 compiler performance compared to GCC, there is Intel Sandy Bridge benchmarks and AMD Bulldozer compiler benchmarks. More compiler benchmarks of LLVM/Clang 3.1 will be coming up later this month.

Discuss this article in our forums, IRC channel, or email the author. You can also follow our content via RSS and on social networks like Facebook, Identi.ca, and Twitter (@Phoronix and @MichaelLarabel). Subscribe to Phoronix Premium to view our content without advertisements, view entire articles on a single page, and experience other benefits.
Latest Hardware Reviews
  1. Intel Haswell HD Graphics 4600 vs. AMD Radeon Graphics On Linux
  2. Intel Haswell HD Graphics 4600 Performance On Ubuntu Linux
  3. Intel Core i7 4770K "Haswell" Benchmarks On Ubuntu Linux
  4. The First Experience Of Intel Haswell On Linux
Latest Software Articles
  1. Optimized Binaries Provide Great Benefits For Intel Haswell
  2. 11-Way Linux, BSD Platform Comparison
  3. SNA Acceleration Works Great For Intel Core i7 Haswell
  4. The Linux Evolution For Intel Haswell's Performance
Latest Linux News
  1. Qt 5.1 Release Candidate 1 Has Arrived
  2. In-Fighting Continues Over Mir On Non-Unity Ubuntu
  3. Subversion 1.8 Presents New Features
  4. LLVM 3.3 Officially Released
  5. LLVM/Clang Now Uses Loop Vectorizer At New Levels
  6. Intel GPU Driver Tries To Rip Out FBDEV Support
  7. Coreboot Doing AMD USB 3.0, Q35 QEMU Emulation
  8. VP9 Codec Now Enabled By Default In Chrome
  9. openSUSE 13.1 M2 Plays On PulseAudio 4.0
  10. Debian 7.1 Rounds In Some Bug-Fixes
  11. Min / Max FPS Comes To Test Results
Latest Forum Talk
  1. In-Fighting Continues Over Mir On Non-Unity Ubuntu
  2. Intel GPU Driver Tries To Rip Out FBDEV Support
  3. Vote for GOG to add Linux versions of games they...
  4. Mir Still Causing Concerns By Ubuntu Derivatives
  5. The Wayland Situation: Facts About X vs. Wayland
  6. LLVM 3.3 Officially Released
  1. Computers
  2. Display Drivers
  3. Graphics Cards
  4. Motherboards
  5. Peripherals
  6. Processors
  7. Software
  8. Operating Systems
  9. All Articles
  1. Linux Benchmarking
  2. OpenBenchmarking.org
  3. Phoronix Test Suite