[committed] wwwdocs: Add release notes for new C2X features in GCC 12

Message ID alpine.DEB.2.22.394.2203252312410.177571@digraph.polyomino.org.uk
State Committed
Headers
Series [committed] wwwdocs: Add release notes for new C2X features in GCC 12 |

Commit Message

Joseph Myers March 25, 2022, 11:13 p.m. UTC
  Committed.
  

Patch

diff --git a/htdocs/gcc-12/changes.html b/htdocs/gcc-12/changes.html
index 9cff81b9..689feeba 100644
--- a/htdocs/gcc-12/changes.html
+++ b/htdocs/gcc-12/changes.html
@@ -193,6 +193,27 @@  a work-in-progress.</p>
   </li>
 </ul>
 
+<h3 id="c">C</h3>
+<ul>
+  <li>Some new features from the upcoming C2X revision of the ISO C
+  standard are supported with <code>-std=c2x</code>
+  and <code>-std=gnu2x</code>.  Some of these features are also
+  supported as extensions when compiling for older language versions.
+  In addition to the features listed, some features previously
+  supported as extensions and now added to the C standard are enabled
+  by default in C2X mode and not diagnosed with <code>-std=c2x
+  -Wpedantic</code>.
+  <ul>
+    <li>Digit separators (as in C++) are supported for C2X.</li>
+    <li>The <code>#elifdef</code> and <code>#elifndef</code>
+    preprocessing directives are now supported.</li>
+    <li>The <code>printf</code> and <code>scanf</code> format checking
+    with <code>-Wformat</code> now supports the <code>%b</code> format
+    specified by C2X for binary integers, and the <code>%B</code>
+    format recommended by C2X for <code>printf</code>.
+  </ul></li>
+</ul>
+
 <h3 id="cxx">C++</h3>
 <ul>
   <li>Several C++23 features have been implemented: