LLVM Clang 16 Defaulting To C++17 As The Default Standard

Written by Michael Larabel in LLVM on 7 September 2022 at 06:46 PM EDT. 16 Comments
LLVM
While LLVM 15.0 was just released this week with many new compiler features, a big change just merged for next spring's LLVM/Clang 16.0 release: C++17 with GNU extensions is now the default C++ and ObjectiveC++ version.

GNU++17 (C++17 with GNU extensions) is now the default C++ standard targeted if no other version is explicitly set for the compiler. This is a bump from GNU++14 as the current C++ default up to LLVM/Clang 15.

For C++ codebases not currently compatible with C++17 and just relying on the defaults to this point will now need to set -std=gnu++14 or older to retain compatibility with the prior default.


Clang's C++17 support has been stable for a while and in fact Apple with their DriverKit already had a change in upstream LLVM to use GNU++17 by default rather than GNU++14 -- today's change is just dropping that Apple DriverKit check.

The changeover of the default C++ version for LLVM Clang happened with this commit following the LLVM discourse discussion over the then-proposed change.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week