Cyber Week 2025: If you wish to enjoy the site ad-free, multi-page articles on a single page, and other benefits, consider joining Phoronix Premium. This week only is our Cyber Week promotion to help support all of our Linux/open-source hardware and software operations while enjoying the added premium benefits at a discounted rate. Thanks for your consideration and support this holiday season with providing daily original content for over 21 years.
Following up on the discussion from earlier this month among GCC developers over switching to C++20 by default for the GCC compiler as the default C++ standard when not otherwise set, that change has indeed happened. Merged now is the change defaulting to C++20 (well, the GNU++20 dialect) rather than C++17/GNU++17 when not otherwise specified when compiling C++ code.
GCC developers had discovered that their own codebase wasn’t entire C++20 ready but they have been landing those fixes too this week so GCC 16 can jive happy with a C++20 default.
This commit yesterday made that change-over to use C++20 (GNU++20) by default instead of C++17. Fixes continuing into GCC Git today have been ironing out the C++20 issues in the compiler’s codebase.
Even with now being in stage 3 development towards the GCC 16.1 stable release in March~April, the C++20 default change managed to get the okay and now the latest GCC Git code is all squared away for this modern default.
This default change may cause some build issues for C++ codebases not ready for C++20 and who aren’t currently specifying “-std=c++17” or similar. At least there are a few months for open-source projects who regularly test against GCC Git to help ensure their codebases are C++20 ready or to otherwise be specifying “-std=c++17” as part of their build system.
For some history, it was back in 2020 when for GCC 11 the default changed from C++14 to C++17.
