On Thu, Jun 12, 2025 at 05:39:26PM +0000, Joseph Myers wrote: > On Wed, 11 Jun 2025, Marek Polacek wrote: > > > This patch adds the C23 Support in GCC table (compiler features only). > > > > While creating it, I've consulted Annex M.2, our own changes.html, > > Joseph's "ISO C23 support in the GNU Toolchain" Cauldron presentation, > > https://en.cppreference.com/w/c/compiler_support.html, > > https://clang.llvm.org/c_status.html#c2x, as well as git archives. > > What's the logic for the ordering? It doesn't appear to be the order in > which things appear in M.2 (M.3 in C2y drafts), which makes it much harder > to review for completeness (I think the starting point is that entries
I'm sorry, I did not mean to make this hard to review. I followed our changes.html document from the oldest to 15. > should correspond one-to-one with those in each subclause of Annex M, > possibly split up where it's useful to report separately on parts of a > feature, but not reordered - this applies to previous versions as well, > but the C23 list is much longer than the C11 one). Maybe there are useful > things to list that aren't included in the Annex M list, but having > everything from the Annex M list is an appropriate starting point. > > (Library features are appropriate to keep in the lists. Eventually these > lists should consistently cover status in the GNU toolchain, so with glibc > versions as well, or both GCC and glibc versions for features with both > compiler and library aspects.) In this version I've sorted the entries to more closely match M.2. But they're still not bijective: I've left out library features as I wouldn't know their status anyway. Some M.2 entries are split into multiple entries in the following table. And still there are some M.2 entries that don't seem like library features that are not covered in the table because I'm not sure they need any compiler changes. For instance, "removed integer width constraints and obsolete sign representations" doesn't need any changes, I think. Another is "modified existing functions to preserve the const-ness of the type placed into the function", I don't what this is talking about. The table has some extra entries like deprecating trigraphs, I think we want to have it there. > > + <tr> > > + <td>Binary integer constants</td> > > + <td><a > > href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2549.pdf">N2549</a></td> > > + <td class="supported">Yes</td> > > + <td></td> > > + </tr> > > GCC 4.3, commit f7fd775f0203c580b35b179976c665db3e4d9e46. Adjusted. > > + <tr> > > + <td><code>#warning</code></td> > > + <td><a > > href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2686.pdf">N2686</a></td> > > + <td class="supported">Yes</td> > > + <td></td> > > + </tr> > > GCC 2.0, it seems. Adjusted. > > + <tr> > > + <td><code>__has_include</code></td> > > + <td><a > > href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2799.pdf">N2799</a></td> > > + <td class="supported">Yes</td> > > + <td></td> > > + </tr> > > GCC 5. Adjusted. > > + <tr> > > + <!-- r10-3658-g843f104d5bc6d1 --> > > + <td><code>strftime</code> supports <code>%OB</code> and > > <code>%Ob</code> > > + formats</td> > > + <td></td> > > + <td class="supported"><a href="../gcc-10/changes.html#c">10</a></td> > > + <td>harmonization with ISO/IEC 9945; glibc support for these formats > > + was added in glibc 2.27</td> > > GCC version would need a note here that it's about format checking, given > that this feature is formally just a library feature. OK, I said "10 (format checking)" in the table. > > + <tr> > > + <!-- r11-4537 --> > > + <td>Give <code>true</code> and <code>false</code> in > > <code><stdbool.h></code> > > + type <code>_Bool</code></td> > > + <td></td> > > + <td class="supported"><a href="../gcc-11/changes.html#c">11</a></td> > > + <td></td> > > + </tr> > > Where does this entry come from? It was an intermediate development > before bool, true and false became keywords and stdbool.h became a legacy > header; I don't see it in Annex M and it doesn't belong there either, > because from the logical user perspective of changes between C17 and C23, > this intermediate state is irrelevant. Removed. It comes from gcc-11/changes.html#c. > > + <tr> > > + <!-- r11-4462-g75ce04fba49eb3 --> > > + <td>Allow duplicate attributes</td> > > + <td><a > > href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2557.pdf">N2557</a></td> > > + <td class="supported"><a href="../gcc-11/changes.html#c">11</a></td> > > + <td></td> > > + </tr> > > This also doesn't belong here as it relates to an intermediate state that > didn't allow duplicate attributes. The logical feature of attributes (and > those of particular supported attributes) has to be considered to include > all subsequent changes to those features up to the release of C23. Removed. > (This also illustrates why adding a C2y table now means you're making > significant future maintenance work for yourself, because a claim "C2y > feature X is supported in GCC version N" can be true now and *become > untrue and require the table to be changed to reflect that* when the > feature - the logical feature from the perspective of a future user - gets > expanded before C2y is released, so it's no longer supported and the > actual GCC version for the final feature is some later version.) I suppose we might do what we've done in https://gcc.gnu.org/projects/cxx-status.html for e.g. Concepts. If a feature F is implemented as per paper P1, then we say so; if a later paper P2 undoes some of F, then we say P2 is/is not implemented yet. I very much like having a table like "C++26 Support in GCC" because it's immediately obvious what is/is not implemented, and if something isn't implemented, we have a PR for it where you can see if someone's already working on it. But if you don't want a C2y table, fair; I've already spent more time on this that I'd planned. > > +<!-- Probably doesn't belong here. Added in r12-4362. > > + <tr> > > + <td>Format checking <code>%b</code>, <code>%B</code> formats</td> > > + <td></td> > > + <td class="supported"><a href="../gcc-12/changes.html#c">12</a></td> > > + <td></td> > > + </tr> > > +--> > > Well, I'd say that the Annex M entry "binary integer literals and > appropriate formatting for input/output of binary integer numbers" should > be split into two. Binary integer literals is a compiler feature, listed > as such. Formatted input/output should be remarked as mainly a glibc > feature (printf support in glibc 2.35, scanf support in 2.38; PRIb*, PRIB* > and SCNb* macros in inttypes.h also in 2.38) but also with GCC format > checking support. And the integer literals have a secondary library part > (strtol etc), also in glibc 2.38. Makes sense, done. > > + <tr> > > + <!-- r13-2324-g2eca4ff4e867eb --> > > + <td><code>[[maybe_unused]]</code> for labels </td> > > + <td><a > > href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2662.pdf">N2662</a></td> > > + <td class="supported"><a href="../gcc-13/changes.html#c">13</a></td> > > + <td></td> > > + </tr> > > Again, intermediate states of the working draft are not relevant to users. > This is simply part of the maybe_unused attribute feature (so implying GCC > 13 as an appropriate version to list there, possibly noting that support > other than on labels was available earlier). Okay, removed. > > + <tr> > > + <!-- r13-3360-g3b3083a598ca3f --> > > + <!-- r13-3534-ge0997c14af5e8b --> > > + <td>Enhanced Enumerations (fixed underlying types)</td> > > + <td><a > > href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3029.htm">N3029</a>, > > + <a > > href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3030.htm">N3030</a></td> > > + <td class="supported"><a href="../gcc-13/changes.html#c">13</a></td> > > + <td></td> > > + </tr> > > There should be a separate entry for "improved rules for handling > enumerations without underlying types, in particular allowing for > enumerations without fixed underlying type to have value representations > that have a greater range than int", or have I missed the corresponding > entry here? (That entry should list some long-ago version that first > supported a feature, possibly with a note about some semantics being > adjusted in GCC 13 (the first of the two commits you list) to match the > C23 semantics - even though that adjustment broke the Linux kernel build, > I don't think it's sufficient to consider the feature unsupported earlier. OK, done, I think. > > + <tr> > > + <!-- r13-4541-gce53cf7b61ea6b --> > > + <td><code>__VA_OPT__</code></td> > > + <td><a > > href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3033.htm">N3033</a></td> > > + <td class="supported"><a href="../gcc-13/changes.html#c">13</a></td> > > + <td>first support added in <a href="../gcc-8/changes.html#c">GCC > > 8</a></td> > > + </tr> > > The convention for these tables is that the main version listed is when > the feature was substantially supported - not the version in which there > was some -pedantic adjustment to diagnostics with a given -std= version. Adjusted. > > + <tr> > > + <td>Bit-precise integer types (<code>_BitInt</code>)</td> > > + <td><a > > href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2763.pdf">N2763</a>, > > + <a > > href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2775.pdf">N2775</a>, > > + <a > > href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2969.htm">N2969</a>, > > + <a > > href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3035.pdf">N3035</a></td> > > + <td class="supported"><a href="../gcc-14/changes.html#c">14</a></td> > > + <td>IA-32, x86-64 and AArch64 (little-endian) only</td> > > + </tr> > > This is going to need to keep being updated when more targets get > support, to indicate the relevant versions for each target. It's probably > also past time to chase up all the target maintainers individually who > haven't added support yet (to ABIs and then to GCC). I've adjusted this to make it clearer that only certain architectures are supported. > > + <tr> > > + <td>IEEE 754 decimal floating-point types</td> > > + <td><a > > href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2341.pdf">N2341</a></td> > > + <!-- XXX Correct? --> > > + <td class="supported">Yes</td> > > + <td></td> > > + </tr> > > Supported only for x86_64/x86/powerpc/s390/aarch64 (AArch64 more recently > than others, so there should maybe be per-target versions somewhere). > Also worth noting explicitly that this is an optional feature, unlike > _BitInt where targets without support aren't fully implementing C23. > > The version listed could reasonably be when DFP was first added to GCC > rather than subsequent -pedantic etc. updates. Done, hopefully. > > + <tr> > > + <td>IEEE 754 interchange and extended types</td> > > + <td><a > > href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2601.pdf">N2601</a></td> > > + <!-- XXX Correct? --> > > + <td class="supported">Yes</td> > > + <td>C23 follows TS 18661-3 (support added in <a > > href="../gcc-7/changes.html#c">GCC 7</a>)</td> > > + </tr> > > +</table> > > GCC 7 for the main support for binary types. Support for the Annex H > suffixes for DFP types was only added in commit > 856809e582bacbceb70cdae56feb86da367f379e, and support for _Decimal64x in > commit 1910ecf15bfcc560dc5089d42c9d75bc30b35c2a, so we didn't have the > decimal FP side of this before then. This whole feature should also be > noted as optional. Done, hopefully. Thanks for the review. V2 patch here. -- >8 -- --- htdocs/projects/c-status.html | 423 +++++++++++++++++++++++++++++++++- 1 file changed, 421 insertions(+), 2 deletions(-) diff --git a/htdocs/projects/c-status.html b/htdocs/projects/c-status.html index 215c5064..09442208 100644 --- a/htdocs/projects/c-status.html +++ b/htdocs/projects/c-status.html @@ -19,10 +19,427 @@ the <code>-std=</code> command-line option. <li><a href="#c99">C99</a></li> <li><a href="#c11">C11</a></li> <li><a href="#c17">C17</a></li> - <li>C23</li> - <li>C2y</li> + <li><a href="#c23">C23</a></li> + <li><a href="#c2y">C2y</a></li> </ul> +<h2 id="c2y">C2y Support in GCC</h2> + +GCC has experimental and incomplete support for ISO C2y. + +<p>C2y can be explicitly selected with the <code>-std=c2y</code> +command-line flag, or <code>-std=gnu2y</code> to enable GNU extensions +as well.</p> + +<!-- +<table class="cxxstatus"> + <tr class="separator"> + <th>Feature</th> + <th>Proposal</th> + <th>Version</th> + <th>Notes</th> + </tr> + <tr> + <td></td> + <td></td> + <td class="supported"><a href="../gcc-4.9/changes.html#c"></a></td> + <td></td> + </tr> +</table> +--> + +<h2 id="c23">C23 Support in GCC</h2> + +GCC has support for ISO C23, the 2023 revision of the ISO C standard +(published in 2024). + +<p>C23 mode is <a href="https://gcc.gnu.org/gcc-15/porting_to.html#c23"> +the default</a> since GCC 15; it can be explicitly selected with the +<code>-std=c23</code> command-line flag, or <code>-std=gnu23</code> +to enable GNU extensions as well.</p> + +<table class="cxxstatus"> + <tr class="separator"> + <th>Feature</th> + <th>Proposal</th> + <th>Version</th> + <th>Notes</th> + </tr> + <tr> + <!-- r13-2520-g0a91bdaf177409 --> + <td>New keywords <code>alignas</code>, <code>alignof</code>, + <code>bool</code>, <code>false</code>, <code>static_assert</code>, + <code>thread_local</code>, <code>true</code></td> + <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2934.pdf">N2934</a>, + <a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2935.pdf">N2935</a></td> + <td class="supported"><a href="../gcc-13/changes.html#c">13</a></td> + <td></td> + </tr> + <tr> + <!-- r9-3505-g9f936c861383dc --> + <td><code>_Static_assert</code> with no message</td> + <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2265.pdf">N2665</a></td> + <td class="supported"><a href="../gcc-9/changes.html#c">9</a></td> + <td>support for <code>_Static_assert</code> with two arguments was added + in C11 and <a href="../gcc-4.6/changes.html#c">GCC 4.6</a></td> + </tr> + <tr> + <!-- r10-4466-g017c6491077bee --> + <!-- r12-244-gcc806126215c3f --> + <td>Removed support for function definitions with identifier lists</td> + <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2432.pdf">N2432</a></td> + <td class="supported"><a href="../gcc-10/changes.html#c">10</a></td> + <td>removal of old-style function definitions</td> + </tr> + <tr> + <!-- r13-2349-g0a4b219d39c74a --> + <td>Removal of unprototyped functions</td> + <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2841.htm">N2841</a></td> + <td class="supported"><a href="../gcc-13/changes.html#c">13</a></td> + <td>function declarations whose parameter list is empty are treated the + same as a parameter list which only contain a single <code>void</code></td> + </tr> + <tr> + <!-- r10-3658-g843f104d5bc6d1 --> + <td><code>strftime</code> supports <code>%OB</code> and <code>%Ob</code> + formats</td> + <td></td> + <td class="supported"><a href="../gcc-10/changes.html#c">10</a> (format + checking)</td> + <td>harmonization with ISO/IEC 9945; glibc support for these formats + was added in glibc 2.27</td> + </tr> + <tr> + <td>IEEE 754 decimal floating-point types (Optional)</td> + <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2341.pdf">N2341</a></td> + <td class="supported"><a href="../gcc-4.3/changes.html#c">4.3</a> + (IA-32, x86-64, PowerPC, S/390) <br> + <a href="../gcc-13/changes.html#c">13</a> (aarch64)</td> + <td></td> + </tr> + <tr> + <td>IEEE 754 interchange and extended types (Optional)</td> + <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2601.pdf">N2601</a></td> + <td class="supported"><a href="../gcc-7/changes.html#c">7</a> (binary types) <br> + <a href="../gcc-15/changes.html#c">15</a> (Annex H suffixes and + <code>_Decimal64x</code>)</td> + <td></td> + </tr> + <tr> + <!-- r10-4613-g00be2a5f394119 --> + <td>Add <code>*_NORM_MAX</code> constants to <code><float.h></code></td> + <td></td> + <td class="supported"><a href="../gcc-10/changes.html#c">10</a></td> + <td></td> + </tr> + <tr> + <!-- r10-3790-g27dfdc0f92850a --> + <td>Update DFP macros in <code><float.h></code></td> + <td></td> + <td class="supported"><a href="../gcc-10/changes.html#c">10</a></td> + <td>adds <code>DEC*_TRUE_MIN</code> macros</td> + </tr> + <tr> + <!-- r11-5070 --> + <td>NaN and Inf macros in <code><float.h></code></td> + <td></td> + <td class="supported"><a href="../gcc-11/changes.html#c">11</a></td> + <td>corresponding built-in functions <code>__builtin_nansdN</code> added</td> + </tr> + <tr> + <!-- r11-5102 --> + <td><code>*_IS_IEC_60559</code> macros in <code><float.h></code></td> + <td></td> + <td class="supported"><a href="../gcc-11/changes.html#c">11</a></td> + <td></td> + </tr> + <tr> + <!-- r11-5103 --> + <td><code>__STDC_WANT_IEC_60559_EXT__</code> supported by <code><float.h></code></td> + <td></td> + <td class="supported"><a href="../gcc-11/changes.html#c">11</a></td> + <td></td> + </tr> + <tr> + <!-- r13-3939-g9a265c974cd85b --> + <td><code>__STDC_VERSION_*_H__</code> header version macros</td> + <td></td> + <td class="supported"><a href="../gcc-13/changes.html#c">13</a></td> + <td></td> + </tr> + <tr> + <!-- r11-4813 --> + <td>Labels before declarations and end of blocks</td> + <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2508.pdf">N2508</a></td> + <td class="supported"><a href="../gcc-11/changes.html#c">11</a></td> + <td></td> + </tr> + <tr> + <!-- r10-4633-g4e03c3a7c1149a --> + <td><code>[[]]</code> attribute syntax</td> + <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2335.pdf">N2335</a>, + <a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2554.pdf">N2554</a></td> + <td class="supported"><a href="../gcc-10/changes.html#c">10</a></td> + <td></td> + </tr> + <tr> + <!-- r11-4953 --> + <td><code>__has_c_attribute</code> preprocessor operator</td> + <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2553.pdf">N2553</a></td> + <td class="supported"><a href="../gcc-11/changes.html#c">11</a></td> + <td></td> + </tr> + <tr> + <!-- r10-4694-g2cc94aa8d817ba --> + <td><code>[[deprecated]]</code></td> + <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2334.pdf">N2334</a></td> + <td class="supported"><a href="../gcc-10/changes.html#c">10</a></td> + <td></td> + </tr> + <tr> + <!-- r10-4633-g4e03c3a7c1149a --> + <td><code>[[fallthrough]]</code></td> + <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2408.pdf">N2408</a></td> + <td class="supported"><a href="../gcc-10/changes.html#c">10</a></td> + <td></td> + </tr> + <tr> + <!-- r10-4729-g97cc11871e3988 --> + <!-- r13-2324-g2eca4ff4e867eb (labels) --> + <td><code>[[maybe_unused]]</code></td> + <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2270.pdf">N2270</a>, + <a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2662.pdf">N2662</a></td> + <td class="supported"><a href="../gcc-13/changes.html#c">13</a></td> + <td>support other than on labels added in <a href="../gcc-10/changes.html#c"> + GCC 10</a></td> + </tr> + <tr> + <!-- r11-4705 --> + <td><code>[[nodiscard]]</code></td> + <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2267.pdf">N2267</a>, + <a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2448.pdf">N2448</a></td> + <td class="supported"><a href="../gcc-11/changes.html#c">11</a></td> + <td></td> + </tr> + <tr> + <!-- r13-2976-g3a3516bc4a0a03 --> + <td><code>[[noreturn]]</code></td> + <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2764.pdf">N2764</a></td> + <td class="supported"><a href="../gcc-13/changes.html#c">13</a></td> + <td></td> + </tr> + <tr> + <!-- r15-3330-gdd346b613886ae --> + <td><code>[[unsequenced]]</code> and <code>[[reproducible]]</code></td> + <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2956.htm">N2956</a></td> + <td class="supported"><a href="../gcc-15/changes.html#c">15</a></td> + <td></td> + </tr> + <tr> + <!-- r10-4691-g7c5890cc0a0ece --> + <td><code>u8</code> character constants</td> + <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2418.pdf">N2418</a></td> + <td class="supported"><a href="../gcc-10/changes.html#c">10</a></td> + <td>for <code>char8_t</code> see + <a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2653.htm">N2653</a></td> + </tr> + <tr> + <td>Type change of <code>u8</code> string literals</td> + <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2653.htm">N2653</a></td> + <td class="supported"><a href="../gcc-13/changes.html#c">13</a></td> + <td></td> + </tr> + <tr> + <!-- r13-3289-g18981635127c67 --> + <td>Introduce storage-class specifiers for compound literals</td> + <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3038.htm">N3038</a></td> + <td class="supported"><a href="../gcc-13/changes.html#c">13</a></td> + <td></td> + </tr> + <tr> + <!-- r13-3930-gb556d1773db717 --> + <td>The <code>constexpr</code> specifier for object definitions</td> + <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3018.htm">N3018</a></td> + <td class="supported"><a href="../gcc-13/changes.html#c">13</a></td> + <td></td> + </tr> + <tr> + <!-- r13-2205-g14cfa01755a66a --> + <td>Support for empty initializer braces</td> + <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2900.htm">N2900</a></td> + <td class="supported"><a href="../gcc-13/changes.html#c">13</a></td> + <td>some cases were already supported, but not scalars and VLAs</td> + </tr> + <tr> + <!-- r13-3135-gfa258f6894801a --> + <td><code>typeof</code>, <code>typeof_unqual</code></td> + <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2927.htm">N2927</a>, + <a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2930.pdf">N2930</a></td> + <td class="supported"><a href="../gcc-13/changes.html#c">13</a></td> + <td><code>typeof</code> was previously supported as an extension</td> + </tr> + <tr> + <!-- r14-6770-g23fee88f84873b --> + <td>Improved tag compatibility</td> + <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3037.pdf">N3037</a></td> + <td class="supported"><a href="../gcc-14/changes.html#c">14</a></td> + <td></td> + </tr> + <tr> + <td>Bit-precise integer types (<code>_BitInt</code>)</td> + <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2763.pdf">N2763</a>, + <a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2775.pdf">N2775</a>, + <a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2969.htm">N2969</a>, + <a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3035.pdf">N3035</a></td> + <td class="supported"><a href="../gcc-14/changes.html#c">14</a> + (IA-32, x86-64 and AArch64 (little-endian) only)</td> + <td></td> + </tr> + <tr> + <!-- r13-3360-g3b3083a598ca3f --> + <td>Improved rules for handling enumerations without underlying types</td> + <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3029.htm">N3029</a></td> + <td class="supported">3.0</td> + <td>allows enums wider than int; adjusted in + <a href="../gcc-13/changes.html#c">GCC 13</a></td> + </tr> + <tr> + <!-- r13-3534-ge0997c14af5e8b --> + <td>Enhanced Enumerations (fixed underlying types)</td> + <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3030.htm">N3030</a></td> + <td class="supported"><a href="../gcc-13/changes.html#c">13</a></td> + <td></td> + </tr> + <tr> + <!-- r15-3599-geba6d2aa71a9b5 and many more --> + <td><code>#embed</code></td> + <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3017.htm">N3017</a></td> + <td class="supported"><a href="../gcc-15/changes.html#c">15</a></td> + <td></td> + </tr> + <tr> + <!-- r13-2206-g60d84e82639e25 --> + <td><code>nullptr</code> constant</td> + <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3042.htm">N3042</a></td> + <td class="supported"><a href="../gcc-13/changes.html#c">13</a></td> + <td></td> + </tr> + <tr> + <!-- r13-4541-gce53cf7b61ea6b --> + <td><code>__VA_OPT__</code></td> + <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3033.htm">N3033</a></td> + <td class="supported"><a href="../gcc-8/changes.html#c">8</a></td> + <td></td> + </tr> + <tr> + <!-- r11-4494 --> + <td>Parameter names may be omitted in function definitions</td> + <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2480.pdf">N2480</a></td> + <td class="supported"><a href="../gcc-11/changes.html#c">11</a></td> + <td></td> + </tr> + <tr> + <!-- r13-3549-g4fe34cdcc80ac2 --> + <td>Relax requirements for variadic parameter lists</td> + <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2975.pdf">N2975</a></td> + <td class="supported"><a href="../gcc-13/changes.html#c">13</a></td> + <td></td> + </tr> + <tr> + <td>Identifier Syntax using Unicode Standard Annex 31</td> + <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2836.pdf">N2836</a></td> + <td class="supported"><a href="../gcc-13/changes.html#c">13</a></td> + <td></td> + </tr> + <tr> + <td><code>__has_include</code></td> + <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2799.pdf">N2799</a></td> + <td class="supported"><a href="../gcc-5/changes.html#c">5</a></td> + <td></td> + </tr> + <tr> + <!-- r13-3620-ge3c898e12d0ace --> + <td>Type inference for object definitions (<code>auto</code>)</td> + <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3007.htm">N3007</a></td> + <td class="supported"><a href="../gcc-13/changes.html#c">13</a></td> + <td></td> + </tr> + <tr> + <!-- r12-730 --> + <td><code>#elifdef</code>, <code>#elifndef</code> preprocessor directives</td> + <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2645.pdf">N2645</a></td> + <td class="supported"><a href="../gcc-12/changes.html#c">12</a></td> + <td></td> + </tr> + <tr> + <td><code>#warning</code></td> + <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2686.pdf">N2686</a></td> + <td class="supported">2.0</td> + <td></td> + </tr> + <tr> + <!-- r0-81205-gf7fd775f0203c5 --> + <td>Binary integer literals formatting</td> + <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2549.pdf">N2549</a></td> + <td class="supported"><a href="../gcc-4.3/changes.html#c">4.3</a></td> + <td></td> + </tr> + <tr> + <td>Formatting for input/output of binary integer numbers</td> + <td></td> + <td class="supported"><a href="../gcc-12/changes.html#c">12</a></td> + <!-- Formatted input/output should be remarked as mainly a glibc + feature (printf support in glibc 2.35, scanf support in 2.38; + PRIb*, PRIB* and SCNb* macros in inttypes.h also in 2.38) but + also with GCC format checking support. And the integer literals + have a secondary library part (strtol etc), also in glibc 2.38. --> + <td>mainly a glibc feature; GCC format checking support present</td> + </tr> + <tr> + <!-- r12-722 --> + <td>Digit separators</td> + <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2626.pdf">N2626</a></td> + <td class="supported"><a href="../gcc-12/changes.html#c">12</a></td> + <td></td> + </tr> + <tr> + <!-- r13-2563-ga1a53dc7d87969 --> + <td><code>unreachable</code> macro in <code><stddef.h></code></td> + <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2826.pdf">N2826</a></td> + <td class="supported"><a href="../gcc-13/changes.html#c">13</a></td> + <td></td> + </tr> + <tr> + <!-- r11-2030 --> + <td><code>BOOL_MAX</code> and <code>BOOL_WIDTH</code> macros in + <code><limits.h></code></td> + <td></td> + <td class="supported"><a href="../gcc-11/changes.html#c">11</a></td> + <td></td> + </tr> + <tr> + <!-- r13-2626-g2e7bc76d84f0aa --> + <td><code>ATOMIC_VAR_INIT</code> removed</td> + <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2886.htm">N2886</a></td> + <td class="supported"><a href="../gcc-13/changes.html#c">13</a></td> + <td></td> + </tr> + <tr> + <!-- r13-2451-g5f38bf14bcb3ff --> + <td>Removal of trigraphs</td> + <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2940.pdf">N2940</a></td> + <td class="supported"><a href="../gcc-13/changes.html#c">13</a></td> + <td>can still be enabled using <code>-trigraphs</code></td> + </tr> + <tr> + <!-- r14-3178-g8441841a1b985d --> + <td><code><stdckdint.h></code> header for checked integer arithmetic</td> + <td></td> + <td class="supported"><a href="../gcc-14/changes.html#c">14</a></td> + <td></td> + </tr> +</table> + <h2 id="c17">C17 Support in GCC</h2> C17 brings no major changes, only technical corrections and clarifications. @@ -31,6 +448,8 @@ C17 brings no major changes, only technical corrections and clarifications. command-line flag, or <code>-std=gnu17</code> to enable GNU extensions as well.</p> +<p>This was the default mode from GCC 8 to GCC 14 (including).</p> + <h2 id="c11">C11 Support in GCC</h2> GCC has support for ISO C11, the 2011 revision of the ISO C standard. -- 2.49.0