From db7ce388dcef50f11af9717570e1e49415733d43 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Tue, 5 Jan 2021 22:42:05 +0100 Subject: [PATCH] doc: reflect the publication of C++20 in invoke.texi and standards.texi Jonathan mentioned on IRC that ISO/IEC 14882:2020 has been published yesterday (and indeed it appears on www.iso.org for sale). I think we should reflect that in our documentation and in cxx-status.html, patches attached. I understand we want to keep C++20 support experimental even in GCC 11, though not sure if we should still talk about "almost certainly change in incompatible ways" rather than that it might change in incompatible ways. 2021-01-05 Jakub Jelinek * doc/invoke.texi (-std=c++20): Adjust for the publication of ISO 14882:2020 standard. * doc/standards.texi: Likewise. --- gcc/doc/invoke.texi | 14 ++++++++------ gcc/doc/standards.texi | 16 ++++++++++++---- 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index b378e63d6bc..226b8ade430 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -2419,15 +2419,17 @@ The name @samp{gnu++1z} is deprecated. @item c++20 @itemx c++2a -The next revision of the ISO C++ standard, planned for -2020. Support is highly experimental, and will almost certainly -change in incompatible ways in future releases. +The 2020 ISO C++ standard plus amendments. +Support is experimental, and could change in incompatible ways in +future releases. +The name @samp{c++2a} is deprecated. @item gnu++20 @itemx gnu++2a -GNU dialect of @option{-std=c++20}. Support is highly experimental, -and will almost certainly change in incompatible ways in future -releases. +GNU dialect of @option{-std=c++20}. +Support is experimental, and could change in incompatible ways in +future releases. +The name @samp{gnu++2a} is deprecated. @end table @item -fgnu89-inline diff --git a/gcc/doc/standards.texi b/gcc/doc/standards.texi index 7c4837d5d41..128b1c67bbc 100644 --- a/gcc/doc/standards.texi +++ b/gcc/doc/standards.texi @@ -192,7 +192,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 and 2014 revisions. +and the 2011, 2014, 2017 and mostly 2020 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 @@ -221,11 +221,18 @@ To select this standard in GCC, use the option @option{-std=c++14}. The C++ language was further revised in 2017 and ISO/IEC 14882:2017 was published. This is referred to as C++17, and before publication was -often referred to as C++1z. GCC supports all the changes in the new +often referred to as C++1z. GCC supports all the changes in that specification. For further details see -@uref{https://gcc.gnu.org/projects/@/cxx-status.html#cxx1z}. Use the option +@uref{https://gcc.gnu.org/projects/@/cxx-status.html#cxx17}. Use the option @option{-std=c++17} to select this variant of C++. +Another revised ISO C++ standard was published in 2020 as ISO/IEC +14882:2020, and is referred to as C++20; before its publication it was +sometimes referred to as C++2a. GCC supports most of the changes in the +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}. + More information about the C++ standards is available on the ISO C++ committee's web site at @uref{http://www.open-std.org/@/jtc1/@/sc22/@/wg21/}. @@ -243,7 +250,8 @@ select an extended version of the C++ language explicitly with @option{-std=gnu++98} (for C++98 with GNU extensions), or @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). +@option{-std=gnu++17} (for C++17 with GNU extensions), or +@option{-std=gnu++20} (for C++20 with GNU extensions). The default, if no C++ language dialect options are given, is @option{-std=gnu++17}. -- 2.30.2