Add release notes for new C2X features in GCC 10

Joseph Myers joseph@codesourcery.com
Wed Nov 20 02:13:00 GMT 2019


I've committed this patch to add release notes for new C2X features in GCC 
10.

diff --git a/htdocs/gcc-10/changes.html b/htdocs/gcc-10/changes.html
index 1e9c3f8d..52eb303c 100644
--- a/htdocs/gcc-10/changes.html
+++ b/htdocs/gcc-10/changes.html
@@ -63,6 +63,44 @@ a work-in-progress.</p>
 
 <!-- <h3 id="c-family">C family</h3> -->
 
+<h3 id="c">C</h3>
+<ul>
+  <li>Several 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>The <code>[[]]</code> attribute syntax is supported, as in
+    C++.  Existing attributes can be used with this syntax in forms
+    such as <code>[[gnu::const]]</code>.  The standard
+    attributes <code>[[deprecated]]</code>, <code>[[fallthrough]]</code>
+    and <code>[[maybe_unused]]</code> are supported.</li>
+    <li>UTF-8 character constants using the <code>u8''</code> syntax
+    are supported.</li>
+    <li><code><float.h></code> defines
+    macros <code>FLT_NORM_MAX</code>, <code>DBL_NORM_MAX</code>
+    and <code>LDBL_NORM_MAX</code>.</li>
+    <li>When decimal floating-point arithmetic is
+    supported, <code><float.h></code> defines
+    macros <code>DEC32_TRUE_MIN</code>, <code>DEC64_TRUE_MIN</code>
+    and <code>DEC128_TRUE_MIN</code>, in addition to the macros that
+    were previously only defined if <code>__STDC_WANT_DEC_FP__</code>
+    was defined before including <code><float.h></code>.</li>
+    <li>In C2X mode, empty parentheses in a function definition give
+    that function a type with a prototype for subsequent calls; other
+    old-style function definitions are diagnosed by default in C2X
+    mode.</li>
+    <li>The <code>strftime</code> format checking supports
+    the <code>%OB</code> and <code>%Ob</code> formats.</li>
+    <li>In C2X mode, <code>-fno-fp-int-builtin-inexact</code> is
+    enabled by default.</li>
+  </ul></li>
+</ul>
+
 <h3 id="cxx">C++</h3>
 <ul>
   <li>Several C++20 features have been implemented:


-- 
Joseph S. Myers
joseph@codesourcery.com



More information about the Gcc-patches mailing list