]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
c++: Adjust docs and option descriptions for the publishing of C++23
authorJakub Jelinek <jakub@redhat.com>
Fri, 1 Nov 2024 18:50:28 +0000 (19:50 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 1 Nov 2024 18:52:16 +0000 (19:52 +0100)
Now that C++23 has been finally published, the following patch attempts
to mention it in the option descriptions and documentation.
Given that it has been published about 1.5 years after being finalized
and has the 14882:2024 document number pair rather than :2023, I wasn't
sure when exactly to use 2023 (as informal name) and when 2024 (as year
of publishing), so I've tried to use 2024 in standards.texi which talks
more formally about the standards and a note that it has been published
in 2024 when it is talked about more informally.
I remember at least one older edition has been published in January too,
but the ISO pages pretend it was published still in December of the previous
year, in this case it doesn't.

2024-11-01  Jakub Jelinek  <jakub@redhat.com>

gcc/
* doc/standards.texi (C++ Language): Mention also the 2024
revision and -std=gnu++23 option.
* doc/invoke.texi (-std=): Adjust description of c++23, c++2b,
gnu++23 and gnu++2b now that ISO C++ 14882:2024 is published.
gcc/c-family/
* c.opt (std=c++2b, std=c++23, std=gnu++2b, std=gnu++23): Adjust
description now that ISO C++ 14882:2024 is published.

gcc/c-family/c.opt
gcc/doc/invoke.texi
gcc/doc/standards.texi

index e2c01083aec2ef83b2a9f774309368d0e9b1b51e..9b9f5e744f660d87c2b800bf23fa435bdf60aff0 100644 (file)
@@ -2558,11 +2558,11 @@ Conform to the ISO 2020 C++ standard (experimental and incomplete support).
 
 std=c++2b
 C++ ObjC++ Alias(std=c++23) Undocumented
-Conform to the ISO 2023 C++ draft standard (experimental and incomplete support).
+Conform to the ISO 2023 C++ standard (published in 2024; experimental and incomplete support).
 
 std=c++23
 C++ ObjC++
-Conform to the ISO 2023 C++ draft standard (experimental and incomplete support).
+Conform to the ISO 2023 C++ standard (published in 2024; experimental and incomplete support).
 
 std=c++2c
 C++ ObjC++ Alias(std=c++26)
@@ -2660,11 +2660,11 @@ Conform to the ISO 2020 C++ standard with GNU extensions (experimental and incom
 
 std=gnu++2b
 C++ ObjC++ Alias(std=gnu++23) Undocumented
-Conform to the ISO 2023 C++ draft standard with GNU extensions (experimental and incomplete support).
+Conform to the ISO 2023 C++ standard with GNU extensions (published in 2024; experimental and incomplete support).
 
 std=gnu++23
 C++ ObjC++
-Conform to the ISO 2023 C++ draft standard with GNU extensions (experimental and incomplete support).
+Conform to the ISO 2023 C++ standard with GNU extensions (published in 2024; experimental and incomplete support).
 
 std=gnu++2c
 C++ ObjC++ Alias(std=gnu++26)
index 455a0b1e7afe60282915957c32630caf9193f254..fd6c0c447096fb90b441ecd883959628e238c3a5 100644 (file)
@@ -2566,17 +2566,19 @@ Support is experimental, and could change in incompatible ways in
 future releases.
 The name @samp{gnu++2a} is deprecated.
 
-@item c++2b
-@itemx c++23
-The next revision of the ISO C++ standard, planned for
-2023.  Support is highly experimental, and will almost certainly
-change in incompatible ways in future releases.
+@item c++23
+@itemx c++2b
+The 2023 ISO C++ standard plus amendments (published in 2024).
+Support is experimental, and could change in incompatible ways in
+future releases.
+The name @samp{c++2b} is deprecated.
 
-@item gnu++2b
-@itemx gnu++23
-GNU dialect of @option{-std=c++2b}.  Support is highly experimental,
-and will almost certainly change in incompatible ways in future
-releases.
+@item gnu++23
+@itemx gnu++2b
+GNU dialect of @option{-std=c++23}.
+Support is experimental, and could change in incompatible ways in
+future releases.
+The name @samp{gnu++2b} is deprecated.
 
 @item c++2c
 @itemx c++26
index 4ef28e910d777f8c9e0fd0ff4daba448ccc1a25c..7e9b5891c1819f3bda9803bc4f23b30048a15e0e 100644 (file)
@@ -204,7 +204,7 @@ information concerning the history of C that is available online, see
 @section C++ Language
 
 GCC supports the original ISO C++ standard published in 1998,
-and the 2011, 2014, 2017 and mostly 2020 revisions.
+and the 2011, 2014, 2017 and mostly 2020 and 2024 revisions.
 
 The original ISO C++ standard was published as the ISO standard (ISO/IEC
 14882:1998) and amended by a Technical Corrigenda published in 2003
@@ -245,6 +245,13 @@ new specification.  For further details see
 @uref{https://gcc.gnu.org/projects/@/cxx-status.html#cxx20}.
 To select this standard in GCC, use the option @option{-std=c++20}.
 
+Yet another revised ISO C++ standard was published in 2024 as ISO/IEC
+14882:2024, and is referred to as C++23; before its publication it was
+sometimes referred to as C++2b.  GCC supports most of the changes in the
+new specification.  For further details see
+@uref{https://gcc.gnu.org/projects/@/cxx-status.html#cxx23}.
+To select this standard in GCC, use the option @option{-std=c++23}.
+
 More information about the C++ standards is available on the ISO C++
 committee's web site at @uref{https://www.open-std.org/@/jtc1/@/sc22/@/wg21/}.
 
@@ -263,7 +270,8 @@ select an extended version of the C++ language explicitly with
 @option{-std=gnu++11} (for C++11 with GNU extensions), or
 @option{-std=gnu++14} (for C++14 with GNU extensions), or
 @option{-std=gnu++17} (for C++17 with GNU extensions), or
-@option{-std=gnu++20} (for C++20 with GNU extensions).
+@option{-std=gnu++20} (for C++20 with GNU extensions), or
+@option{-std=gnu++23} (for C++23 with GNU extensions).
 
 The default, if
 no C++ language dialect options are given, is @option{-std=gnu++17}.