LLVM Clang 16 Defaulting To C++17 As The Default Standard
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.
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.
16 Comments