On 6/12/26 12:34 PM, Jakub Jelinek wrote:
On Fri, Jun 12, 2026 at 12:30:00PM -0400, Marek Polacek wrote:
On Fri, Jun 12, 2026 at 05:54:44PM +0200, Jakub Jelinek wrote:
The following patch adds a new -std= option arguments for C++29 and
changes __cplusplus value for C++26 from 202400L to 202603L.
Ok for trunk?
Looks OK (not an approval) to me (provided the 202603L value
is now settled).
I think it is, though e.g.
https://eel.is/c++draft/cpp.predefined#1.1
renders it as 2026WIP (but maybe that is a placeholder already for C++29,
who knows).
Yes, that value matches
https://github.com/cplusplus/draft/blob/8ab1a9b574d97fea3809a2885c7f41f5d60b93f6/papers/n5051.md
.
+++ gcc/c-family/c.opt 2026-06-12 17:05:03.744184261 +0200
@@ -2676,6 +2676,14 @@ std=c++26
C++ ObjC++ Undocumented
Conform to the ISO 2026 C++ draft standard (experimental and incomplete
support).
+std=c++2d
+C++ ObjC++ Alias(std=c++29)
+Conform to the ISO 2029 C++ draft standard (experimental and incomplete
support).
+
+std=c++29
+C++ ObjC++ Undocumented
+Conform to the ISO 2029 C++ draft standard (experimental and incomplete
support).
Let's make 29 the documented one.
+@item gnu++2d
+@itemx gnu++29
+GNU dialect of @option{-std=c++2d}. Support is highly experimental,
...and refer to -std=c++29.
+++ gcc/testsuite/lib/g++-dg.exp 2026-06-12 17:21:41.122906679 +0200
@@ -78,7 +78,7 @@ proc g++-std-flags { test } {
# The order of this list is significant: first $cxx_default,
# then the oldest and newest, then others in rough order of
# importance based on test coverage and usage.
- foreach ver { 20 98 26 17 11 14 23 } {
+ foreach ver { 20 98 26 17 11 14 23 29 } {
Here 29 should replace 26 in the third position, and 26 move to the end.
OK with those adjustments.
Jason