[wwwdocs] Document change to -std=gnu++20 and non-experimental C++20 support

Jonathan Wakely jwakely@redhat.com
Fri Apr 17 21:16:31 GMT 2026


Does this look OK for wwwdocs?

There are other libstdc++ changes that should be added to this page, and
the porting_to.html page needs work, but this is the main thing.

---
 htdocs/gcc-16/changes.html | 21 +++++++++++++++++----
 1 file changed, 17 insertions(+), 4 deletions(-)

diff --git a/htdocs/gcc-16/changes.html b/htdocs/gcc-16/changes.html
index fb0719d5..56c63e99 100644
--- a/htdocs/gcc-16/changes.html
+++ b/htdocs/gcc-16/changes.html
@@ -204,6 +204,16 @@ for general information.</p>
 <h3 id="cxx">C++</h3>
 
 <ul>
+  <li>C++20 by default: GCC 16 changes the default language version
+    for C++ compilation from
+    <a href="https://gcc.gnu.org/onlinedocs/gcc/C-Dialect-Options.html#index-std-1">-std=gnu++17</a>
+    to
+    <a href="https://gcc.gnu.org/onlinedocs/gcc/C-Dialect-Options.html#index-std-1">-std=gnu++20</a>.
+    If your code relies on older versions of the C++ standard, you will need to
+    either add
+    <a href="https://gcc.gnu.org/onlinedocs/gcc/C-Dialect-Options.html#index-std-1">-std=</a>
+    to your build flags, or port your code; see <a href="porting_to.html#cxx23">the porting notes</a>.
+  </li>
   <li>Several C++26 features have been implemented:
     <ul>
       <li><a href="https://wg21.link/P2996R13">P2996R13</a>, Reflection
@@ -295,8 +305,11 @@ struct Affected : E
     C++17 mode.
   </li>
  
-  <li>Improved experimental support for C++20, including:
+  <li>Improved support for C++20, including:
     <ul>
+    <li>
+      The C++20 implementation is no longer experimental.
+    </li>
     <li>
       Working <code>std::chrono::current_zone()</code> on Windows
       (thanks to Björn Schäpers).
@@ -331,9 +344,9 @@ struct Affected : E
         Representation of some range adaptors in <code><ranges></code>.
       </li>
     </ul>
-    This list is not necessarily complete. As with all experimental support,
-    programs using C++20 components should assume that those components
-    are not compatible between different major releases.
+    This list is not necessarily complete. As C++20 support was experimental
+    before GCC 16, programs using C++20 components should assume that those
+    components are not compatible with older releases.
   </li>
   <li>Improved experimental support for C++23, including:
     <ul>
-- 
2.53.0



More information about the Libstdc++ mailing list