#gcc
7 posts tagged #gcc.
C++29 mode is open, and the compilers already disagree
LLVM 23.1 shipped with -std=c++2d, a mode for the standard after C++26, and GCC trunk has one too. Both report __cplusplus as 202700. They do not agree about C++26 itself: GCC says 202603, which is the ratified value, and clang still says 202400.
A C++26 structured binding that GCC and Clang disagree about
C++26 lets a structured binding declaration be the condition of an if. GCC 16.1 and Clang 22.1 both implement it and both agree on ordinary structs. Put a tuple-protocol type in the condition and evaluate it at compile time, and GCC rejects the program while Clang accepts it. The reproducer is twenty lines and needs no library.
C++26 contracts, and the const rule the compiler makes you learn
Contracts are one of the four headline C++26 features and they run on GCC 16.1 today. Two things surprise people on first contact: a by-value parameter named in a postcondition must be const, and what a violation actually does is a compiler flag rather than a property of your code.
GCC 16.2 is out, LLVM 23.1 is nearly there, MSVC is still finishing C++23
GCC 16.2 shipped on 7 August with more than a hundred regression fixes and no new features. LLVM 23.1 reached its third release candidate on 12 August and has not shipped. MSVC has no C++26 date. If you want to write C++26 today, the practical answer remains GCC, and this is where each toolchain actually stands.
GCC will decline AI-generated contributions above the legal threshold
The GCC Steering Committee has adopted a policy declining any legally significant contribution that includes or is derived from LLM-generated content. Test cases are an explicit exception, small contributions are allowed if clearly marked, and using a model to find bugs or review patches stays permitted. Commits that had AI help need an Assisted-by tag, and only humans may submit or sign off.
Reflection in the wild: April 2026 in five links
Five things happened to C++26 reflection in April 2026: GCC 16.1, Glaze v7.2, a Revzin write-up, a Lemire/Thiesen JSON talk, and one honest list of what is still not shipping.
GCC 16.1 ships C++26 reflection -- your 30-line hands-on
GCC 16.1 dropped on 30 April 2026 with -freflection. C++26 was finalized at Croydon five weeks earlier. Here is a 25-line program you can compile and run today on your laptop.