[clang] [clang][NFC] sort C standards on status page in reverse chronological order (PR #102844)

via cfe-commits cfe-commits at lists.llvm.org
Sun Aug 11 20:49:27 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang

Author: None (h-vetinari)

<details>
<summary>Changes</summary>

Put the newest standards first, same as for the [C++ status page](https://clang.llvm.org/cxx_status.html).

The diff is pretty busted, but I swear I copy & pasted faithfully 😅 

The only change beyond shuffling sections around is unfolding the sections for C99/C11 (6dbce28763153ca20138b139b9455056f173ee22), which isn't necessary anymore now that they're safely tucked away towards the end of the page.

---

Patch is 99.62 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/102844.diff


1 Files Affected:

- (modified) clang/www/c_status.html (+822-822) 


``````````diff
diff --git a/clang/www/c_status.html b/clang/www/c_status.html
index a5d04506b642bc..99c14aaf506e51 100644
--- a/clang/www/c_status.html
+++ b/clang/www/c_status.html
@@ -37,9 +37,24 @@ <h1>C Support in Clang</h1>
  <th>Available in Clang?</th>
 </tr>
 <tr>
- <td><a href="#c89">C89</a></td>
- <td><tt>-std=c89</tt></td>
- <td class="full" align="center">Yes</td>
+ <td><a href="#c2y">C2y</a></td>
+ <td><tt>-std=c2y</tt></td>
+ <td class="partial" align="center">Partial</td>
+</tr>
+<tr>
+ <td><a href="#c2x">C23</a></td>
+ <td><tt>-std=c23</tt></td>
+ <td class="partial" align="center">Partial</td>
+</tr>
+<tr>
+ <td><a href="#c17">C17</a></td>
+ <td><tt>-std=c17</tt></td>
+ <td class="partial" align="center">Partial</td>
+</tr>
+<tr>
+ <td><a href="#c11">C11</a></td>
+ <td><tt>-std=c11</tt></td>
+ <td class="partial" align="center">Partial</td>
 </tr>
 <tr>
  <td><a href="#c99">C99</a></td>
@@ -55,24 +70,9 @@ <h1>C Support in Clang</h1>
       back to 3.0. -->
 </tr>
 <tr>
- <td><a href="#c11">C11</a></td>
- <td><tt>-std=c11</tt></td>
- <td class="partial" align="center">Partial</td>
-</tr>
-<tr>
- <td><a href="#c17">C17</a></td>
- <td><tt>-std=c17</tt></td>
- <td class="partial" align="center">Partial</td>
-</tr>
-<tr>
- <td><a href="#c2x">C23</a></td>
- <td><tt>-std=c23</tt></td>
- <td class="partial" align="center">Partial</td>
-</tr>
-<tr>
- <td><a href="#c2y">C2y</a></td>
- <td><tt>-std=c2y</tt></td>
- <td class="partial" align="center">Partial</td>
+ <td><a href="#c89">C89</a></td>
+ <td><tt>-std=c89</tt></td>
+ <td class="full" align="center">Yes</td>
 </tr>
 </table>
 
@@ -89,1233 +89,1233 @@ <h1>C Support in Clang</h1>
 the "c", "c99", "c11", "c17", "c23", and "c2y" labels to track known bugs with Clang's language
 conformance.</p>
 
-<h2 id="c89">C89 implementation status</h2>
-
-<p>Clang implements all of the ISO 9899:1990 (C89) standard.</p>
-<p>You can use Clang in C89 mode with the <code>-std=c89</code> or <code>-std=c90</code> options.</p>
+<h2 id="c2y">C2y implementation status</h2>
 
-<h2 id="c99">C99 implementation status</h2>
+<p>Clang has support for some of the features of the C standard following C23, informally referred to as C2y.</p>
 
-<p>Clang implements all of the ISO 9899:1999 (C99) standard.</p>
-<p>Note, the list of C99 features comes from the C99 committee draft. Not all C99 documents are publicly available, so the documents referenced in this section may be inaccurate, unknown, or not linked.</p>
-<!-- https://www.open-std.org/jtc1/sc22/wg14/www/docs/n874.htm contains the
-     final editor's report of what's been added to C99, but it includes more
-     papers than are worth listing because it includes editorial and cleanup
-     proposals in addition to feature proposals. When a paper is not available,
-     I list the paper number from the editor's report, but do not hyperlink it.
-     When I can't map the feature back to a paper, I mark it as unknown. -->
-<p>You can use Clang in C99 mode with the <code>-std=c99</code> option.</p>
+<p>You can use Clang in C2y mode with the <code>-std=c2y</code> option (available in Clang 19 and later).</p>
 
-<details>
+<details open>
 <summary>List of features and minimum Clang version with support</summary>
 
 <table width="689" border="1" cellspacing="0">
  <tr>
     <th>Language Feature</th>
-    <th>C99 Proposal</th>
+    <th>C2y Proposal</th>
     <th>Available in Clang?</th>
  </tr>
+    <!-- Strasbourg 2024 Papers -->
     <tr>
-      <td>restricted character set support via digraphs and <iso646.h></td>
-      <td>Unknown</td>
+      <td>Sequential hexdigits</td>
+      <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3192.pdf">N3192</a></td>
       <td class="full" align="center">Yes</td>
     </tr>
+    <!-- Jun 2024 Papers -->
     <tr>
-      <td>more precise aliasing rules via effective type</td>
-      <td>Unknown</td>
+      <td>Generic selection expression with a type operand</td>
+      <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3260.pdf">N3260</a></td>
+      <td class="full" align="center">Clang 17</td>
+    </tr>
+    <tr>
+      <td>Round-trip rounding</td>
+      <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3232.pdf">N3232</a></td>
       <td class="full" align="center">Yes</td>
+      <!-- editorial changes, no tests required -->
     </tr>
     <tr>
-      <td>restricted pointers</td>
-      <td>N448</td>
+      <td>Accessing byte arrays</td>
+      <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3254.pdf">N3254</a></td>
+      <td class="full" align="center">Yes</td>
+    </tr>
+    <tr>
+      <td>Slay some earthly demons I</td>
+      <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3244.pdf">N3244</a></td>
       <td class="partial" align="center">
+      <!-- Voted in:
+             Annex J Item 21 (including additional change)
+             Annex J Item 56
+             Annex J Item 57 Option 1
+             Annex J Item 67
+             Annex J Item 69 (alternative wording for semantics)
+      -->
         <details><summary>Partial</summary>
-          Clang's support for <code>restrict</code> is fully conforming but
-          considered only partially implemented. Clang implements all of the
-          constraints required for <code>restrict</code> support, but LLVM only
-          supports <code>restrict</code> optimization semantics for restricted
-          pointers used as function parameters; it does not fully support the
-          semantics for restrict on local variables or data members.
+          Clang does not document the implementation-defined behavior for decay
+          of an array with the register storage class specifier. Clang does not
+          diagnose an <code>extern inline</code> function with no definition in
+          the TU. Clang accepts and rejects redeclarations with/without an
+          alignment specifier, depending on the order of the declarations.
         </details>
       </td>
     </tr>
     <tr>
-      <td>variable length arrays</td>
-      <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n683.htm">N683</a></td>
+      <td>Support ++ and -- on complex values</td>
+      <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3259.pdf">N3259</a></td>
       <td class="full" align="center">Yes</td>
     </tr>
     <tr>
-      <td>flexible array members</td>
-      <td>Unknown</td>
+      <td>Usability of a byte-wise copy of va_list</td>
+      <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3262.pdf">N3262</a></td>
       <td class="full" align="center">Yes</td>
     </tr>
     <tr>
-      <td>static and type qualifiers in parameter array declarators</td>
-      <td>Unknown</td>
-      <td class="full" align="center">Yes</td>
+      <td>alignof of an incomplete array type</td>
+      <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3273.pdf">N3273</a></td>
+      <td class="full" align="center">Clang 3.5</td>
     </tr>
     <tr>
-      <td>complex and imaginary support in <complex.h></td>
-      <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n693.ps">N693</a></td>
-      <td class="partial" align="center">
-        <details><summary>Partial</summary>
-          Clang supports <code>_Complex</code> type specifiers but does not
-          support <code>_Imaginary</code> type specifiers. Support for
-          <code>_Imaginary</code> is optional in C99 and Clang does not claim
-          conformance to Annex G.<br />
-          <br />
-          <code>_Complex</code> support requires an underlying support library
-          such as compiler-rt to provide functions like <code>__divsc3</code>,
-          but compiler-rt is not supported on Windows.
-        </details>
-      </td>
+      <td>Remove imaginary types</td>
+      <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3274.pdf">N3274</a></td>
+      <td class="full" align="center">Yes</td>
     </tr>
+</table>
+</details>
+
+<h2 id="c2x">C23 implementation status</h2>
+
+<p>Clang has support for some of the features of the C standard following C17, informally referred to as C23.</p>
+
+<p>You can use Clang in C23 mode with the <code>-std=c23</code> option (available in Clang 18 and later) or with the
+   <code>-std=c2x</code> option (available in Clang 9 and later).</p>
+
+<details open>
+<summary>List of features and minimum Clang version with support</summary>
+
+<table width="689" border="1" cellspacing="0">
+ <tr>
+    <th>Language Feature</th>
+    <th>C23 Proposal</th>
+    <th>Available in Clang?</th>
+ </tr>
+    <!-- Pre-Oct 2019 Papers -->
     <tr>
-      <td>type-generic math macros in <tgmath.h></td>
-      <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n693.ps">N693</a></td>
-      <td class="full" align="center">Yes</td>
+      <td>Evaluation formats</td>
+      <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2186.pdf">N2186</a></td>
+      <td class="unknown" align="center">Unknown</td>
     </tr>
     <tr>
-      <td>the long long int type</td>
-      <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n601.ps">N601</a></td>
-      <td class="full" align="center">Yes</td>
+      <td>Harmonizing static_assert with C++</td>
+      <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2265.pdf">N2665</a></td>
+      <td class="full" align="center">Clang 9</td>
     </tr>
     <tr>
-      <td>increase minimum translation limits</td>
-      <td>N590</td>
-      <td class="full" align="center">Clang 3.2</td>
+      <td>nodiscard attribute</td>
+      <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2267.pdf">N2267</a></td>
+      <td class="full" align="center">Clang 9</td>
     </tr>
     <tr>
-      <td>additional floating-point characteristics in <float.h></td>
-      <td>Unknown</td>
-      <td class="full" align="center">Clang 16</td>
+      <td>maybe_unused attribute</td>
+      <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2270.pdf">N2270</a></td>
+      <td class="full" align="center">Clang 9</td>
     </tr>
-    <tr id="implicit int">
-      <td rowspan="4">remove implicit int</td>
+    <tr id="TS18661">
+      <td rowspan="10">TS 18661 Integration</td>
     </tr>
-      <tr>
-        <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n635.htm">N635</a></td>
-        <td class="full" align="center">Yes</td>
+      <tr> <!-- Pre-Oct 2019 -->
+        <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2314.pdf">N2314</a></td>
+        <td class="unknown" align="center">Unknown</td>
       </tr>
-      <tr>
-        <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n692.htm">N692</a></td>
-        <td class="full" align="center">Yes</td>
+      <tr> <!-- Pre-Oct 2019 -->
+        <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2341.pdf">N2341</a></td>
+        <td class="unknown" align="center">Unknown</td>
+      </tr>
+      <tr> <!-- Pre-Oct 2019 -->
+        <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2401.pdf">N2401</a></td>
+        <td class="unknown" align="center">Unknown</td>
+      </tr>
+      <tr> <!-- Pre-Oct 2019 -->
+        <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2359.pdf">N2359</a></td>
+        <td class="none" align="center">No</td>
+      </tr>
+      <tr> <!-- Nov 2020 -->
+        <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2546.pdf">N2546</a></td>
+        <td class="unknown" align="center">Unknown</td>
       </tr>
       <tr>
-        <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n722.htm">N722</a></td>
-        <td class="full" align="center">Yes</td>
+        <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2580.htm">N2580</a></td>
+        <td class="unknown" align="center">Unknown</td>
+      </tr>
+      <tr> <!-- Apr 2021 -->
+        <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2640.htm">N2640</a></td>
+        <td class="unknown" align="center">Unknown</td>
+      </tr>
+      <tr> <!-- Sep 2021 -->
+        <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2755.htm">N2755</a></td>
+        <td class="unknown" align="center">Unknown</td>
+      </tr>
+      <tr> <!-- Feb 2022 -->
+        <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2931.pdf">N2931</a></td>
+        <td class="unknown" align="center">Unknown</td>
       </tr>
     <tr>
-      <td>reliable integer division</td>
-      <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n617.htm">N617</a></td>
-      <td class="full" align="center">Yes</td>
+      <td>Preprocessor line numbers unspecified</td>
+      <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2322.htm">N2322</a></td>
+      <td class="partial" align="center">
+        <details><summary>Partial</summary>
+        The line number associated with a macro invocation is not the line
+        number of the first character of the macro name in the invocation.
+        Additionally, Clang may not associate the line number of a pp-directive
+        with the first <code>#</code> token. As these are recommended practices
+        and not normative requirements, Clang's behavior is still conforming.
+        </details>
+      </td>
     </tr>
     <tr>
-      <td>universal character names (\u and \U)</td>
-      <td>Unknown</td>
-      <td class="full" align="center">Yes</td>
+      <td>deprecated attribute</td>
+      <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2334.pdf">N2334</a></td>
+      <td class="full" align="center">Clang 9</td>
     </tr>
-    <tr>
-      <td>extended identifiers</td>
-      <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n717.htm">N717</a></td>
-      <td class="full" align="center">Clang 17</td>
+    <tr id="Attributes">
+      <td rowspan="3">Attributes</td>
     </tr>
-    <tr>
-      <td>hexadecimal floating-point constants</td>
-      <td>N308</td>
-      <!-- This is a total guess. N874 makes no mention of N308 being accepted,
-           but it does mention *use* of hexadecimal floating-point constants in
-           the Menlo Park minutes associated with N787. -->
+      <tr> <!-- Pre-Oct 2019 -->
+        <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2335.pdf">N2335</a></td>
+        <td class="full" align="center">Clang 9</td>
+      </tr>
+      <tr> <!-- Aug 2020 -->
+        <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2554.pdf">N2554</a></td>
+        <td class="full" align="center">Clang 9</td>
+      </tr>
+    <tr>
+      <td>Defining new types in offsetof</td>
+      <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2350.htm">N2350</a></td>
       <td class="full" align="center">Yes</td>
     </tr>
     <tr>
-      <td>compound literals</td>
-      <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n716.htm">N716</a></td>
-      <td class="full" align="center">Yes</td>
+      <td>fallthrough attribute</td>
+      <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2408.pdf">N2408</a></td>
+      <td class="full" align="center">Clang 9</td>
     </tr>
     <tr>
-      <td>designated initializers</td>
-      <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n494.pdf">N494</a></td>
-      <td class="full" align="center">Yes</td>
+      <td>Two's complement sign representation</td>
+      <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2412.pdf">N2412</a></td>
+      <td class="full" align="center">Clang 14</td>
     </tr>
     <tr>
-      <td>// comments</td>
-      <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n644.htm">N644</a></td>
-      <td class="full" align="center">Yes</td>
+      <td>Adding the u8 character prefix</td>
+      <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2418.pdf">N2418</a></td>
+      <td class="full" align="center">Clang 15</td>
     </tr>
     <tr>
-      <td>extended integer types and library functions in <inttypes.h> and <stdint.h></td>
-      <td>Unknown</td>
-      <!-- Seems to be related to https://www.open-std.org/jtc1/sc22/wg14/www/docs/n788.htm
-           but that does not have any content for stdint.h. The next paper I could find on
-           the topic was https://www.open-std.org/jtc1/sc22/wg14/www/docs/n851.htm but that
-           implies stdint.h was already added. -->
-      <td class="full" align="center">Yes</td>
+      <td>Remove 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="full" align="center">Clang 15</td>
     </tr>
+    <!-- Oct 2019 Papers -->
+    <!-- WG14 N2379 *_IS_IEC_60559 feature test macros was removed by a later
+         change to C23. -->
     <tr>
-      <td>remove implicit function declaration</td>
-      <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n636.htm">N636</a></td>
-      <td class="full" align="center">Yes</td>
+      <td>Annex F.8 update for implementation extensions and rounding</td>
+      <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2384.pdf">N2384</a></td>
+      <td class="unknown" align="center">Unknown</td>
     </tr>
     <tr>
-      <td>preprocessor arithmetic done in intmax_t/uintmax_t</td>
-      <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n736.htm">N736</a></td>
-      <td class="full" align="center">Yes</td>
+      <td>_Bool definitions for true and false</td>
+      <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2393.pdf">N2393</a></td>
+      <td class="na" align="center">Subsumed by N2935</td>
     </tr>
+    <!-- Mar 2020 Papers -->
     <tr>
-      <td>mixed declarations and code</td>
-      <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n740.htm">N740</a></td>
-      <td class="full" align="center">Yes</td>
+      <td>[[nodiscard("should have a reason")]]</td>
+      <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2448.pdf">N2448</a></td>
+      <td class="full" align="center">Clang 10</td>
     </tr>
     <tr>
-      <td>new block scopes for selection and iteration statements</td>
-      <td>Unknown</td>
-      <td class="full" align="center">Yes</td>
+      <td>Allowing unnamed parameters in function definitions</td>
+      <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2480.pdf">N2480</a></td>
+      <td class="full" align="center">Clang 11</td>
     </tr>
+    <!-- Aug 2020 Papers -->
     <tr>
-      <td>integer constant type rules</td>
-      <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n629.htm">N629</a></td>
-      <td class="full" align="center">Yes</td>
+      <td>Free positioning of labels inside compound statements</td>
+      <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2508.pdf">N2508</a></td>
+      <td class="full" align="center">Clang 18</td>
     </tr>
     <tr>
-      <td>integer promotion rules</td>
-      <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n725.htm">N725</a></td>
-      <td class="full" align="center">Yes</td>
+      <td>Clarification request for C17 example of undefined behavior</td>
+      <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2517.pdf">N2517</a></td>
+      <td class="none" align="center">No</td>
     </tr>
     <tr>
-      <td>macros with a variable number of arguments</td>
-      <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n707.htm">N707</a></td>
+      <td>Querying attribute support</td>
+      <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2553.pdf">N2553</a></td>
+      <td class="full" align="center">Clang 9</td>
+    </tr>
+    <!-- Nov 2020 Papers -->
+    <tr>
+      <td>Binary literals</td>
+      <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2549.pdf">N2549</a></td>
+      <td class="full" align="center">Clang 9</td>
+    </tr>
+    <tr>
+      <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="full" align="center">Clang 13</td>
+    </tr>
+    <tr>
+      <td>Character encoding of diagnostic text</td>
+      <td><a href="https://www.open-std.org/jtc1/...
[truncated]

``````````

</details>


https://github.com/llvm/llvm-project/pull/102844


More information about the cfe-commits mailing list