Fix test failures introduced by PR #113697 (#116941)
[llvm-project.git] / clang / www / c_status.html
blobca2ca5398bb8739e56842f4c1a9fb54ff0562794
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
5 <title>Clang - C Programming Language Status</title>
6 <link type="text/css" rel="stylesheet" href="menu.css">
7 <link type="text/css" rel="stylesheet" href="content.css">
8 <style type="text/css">
9 .none { background-color: #FFCCCC }
10 .partial { background-color: #FFE0B0 }
11 .unreleased { background-color: #FFFF99 }
12 .unknown { background-color: #EBCAFE }
13 .full { background-color: #CCFF99 }
14 .na { background-color: #DDDDDD }
15 :target { background-color: #FFFFBB; outline: #DDDD55 solid thin; }
16 th { background-color: #FFDDAA }
17 td { vertical-align: middle }
18 tt { white-space: nowrap }
19 </style>
20 </head>
21 <body>
23 <!--#include virtual="menu.html.incl"-->
25 <div id="content">
27 <!--*************************************************************************-->
28 <h1>C Support in Clang</h1>
29 <!--*************************************************************************-->
31 <p>Clang implements the following published and upcoming ISO C standards:</p>
33 <table width="689" border="1" cellspacing="0">
34 <tr>
35 <th>Language Standard</th>
36 <th>Flag</th>
37 <th>Available in Clang?</th>
38 </tr>
39 <tr>
40 <td><a href="#c2y">C2y</a></td>
41 <td><tt>-std=c2y</tt></td>
42 <td class="partial" align="center">Partial</td>
43 </tr>
44 <tr>
45 <td><a href="#c2x">C23</a></td>
46 <td><tt>-std=c23</tt></td>
47 <td class="partial" align="center">Partial</td>
48 </tr>
49 <tr>
50 <td><a href="#c17">C17</a></td>
51 <td><tt>-std=c17</tt></td>
52 <td class="partial" align="center">Partial</td>
53 </tr>
54 <tr>
55 <td><a href="#c11">C11</a></td>
56 <td><tt>-std=c11</tt></td>
57 <td class="partial" align="center">Partial</td>
58 </tr>
59 <tr>
60 <td><a href="#c99">C99</a></td>
61 <td><tt>-std=c99</tt></td>
62 <td class="full" align="center">Clang 17</td>
63 <!-- We claim full conformance to C99 despite there being a few entries marked
64 "partial". The partial entries do not impact whether we conform to the
65 letter of the standard, but they are for circumstances where the missing
66 support is thought to only be in edge cases or where we believe we could
67 make further efforts to significantly improve the support. While we list
68 Clang 17 as the version of Clang which fully supports C99, support for
69 the language mode was largely complete in earlier versions of Clang going
70 back to 3.0. -->
71 </tr>
72 <tr>
73 <td><a href="#c89">C89</a></td>
74 <td><tt>-std=c89</tt></td>
75 <td class="full" align="center">Yes</td>
76 </tr>
77 </table>
79 <p>The implementation status for C11 and C23 are currently under investigation.
80 Any proposal whose status in Clang is currently unknown will be marked in
81 <span class="unknown">magenta</span>.</p>
83 <p>The Clang community is continually striving to improve C standards
84 compliance between releases by submitting and tracking
85 <a href="c_dr_status.html">C Defect Reports</a> and implementing resolutions as
86 they become available.</p>
88 <p>The <a href="https://github.com/llvm/llvm-project/issues/">LLVM bug tracker</a> uses
89 the "c", "c99", "c11", "c17", "c23", and "c2y" labels to track known bugs with Clang's language
90 conformance.</p>
92 <h2 id="c2y">C2y implementation status</h2>
94 <p>Clang has support for some of the features of the C standard following C23, informally referred to as C2y.</p>
96 <p>You can use Clang in C2y mode with the <code>-std=c2y</code> option (available in Clang 19 and later).</p>
98 <details open>
99 <summary>List of features and minimum Clang version with support</summary>
101 <table width="689" border="1" cellspacing="0">
102 <tr>
103 <th>Language Feature</th>
104 <th>C2y Proposal</th>
105 <th>Available in Clang?</th>
106 </tr>
107 <!-- Strasbourg 2024 Papers -->
108 <tr>
109 <td>Sequential hexdigits</td>
110 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3192.pdf">N3192</a></td>
111 <td class="full" align="center">Yes</td>
112 </tr>
113 <!-- Jun 2024 Papers -->
114 <tr>
115 <td>Generic selection expression with a type operand</td>
116 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3260.pdf">N3260</a></td>
117 <td class="full" align="center">Clang 17</td>
118 </tr>
119 <tr>
120 <td>Round-trip rounding</td>
121 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3232.pdf">N3232</a></td>
122 <td class="full" align="center">Yes</td>
123 <!-- editorial changes, no tests required -->
124 </tr>
125 <tr>
126 <td>Accessing byte arrays</td>
127 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3254.pdf">N3254</a></td>
128 <td class="full" align="center">Yes</td>
129 </tr>
130 <tr>
131 <td>Slay some earthly demons I</td>
132 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3244.pdf">N3244</a></td>
133 <td class="partial" align="center">
134 <!-- Voted in:
135 Annex J Item 21 (including additional change)
136 Annex J Item 56
137 Annex J Item 57 Option 1
138 Annex J Item 67
139 Annex J Item 69 (alternative wording for semantics)
141 <details><summary>Partial</summary>
142 Clang does not document the implementation-defined behavior for decay
143 of an array with the register storage class specifier. Clang does not
144 diagnose an <code>extern inline</code> function with no definition in
145 the TU. Clang accepts and rejects redeclarations with/without an
146 alignment specifier, depending on the order of the declarations.
147 </details>
148 </td>
149 </tr>
150 <tr>
151 <td>Support ++ and -- on complex values</td>
152 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3259.pdf">N3259</a></td>
153 <td class="full" align="center">Yes</td>
154 </tr>
155 <tr>
156 <td>Usability of a byte-wise copy of va_list</td>
157 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3262.pdf">N3262</a></td>
158 <td class="full" align="center">Yes</td>
159 </tr>
160 <tr>
161 <td>alignof of an incomplete array type</td>
162 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3273.pdf">N3273</a></td>
163 <td class="full" align="center">Clang 3.5</td>
164 </tr>
165 <tr>
166 <td>Remove imaginary types</td>
167 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3274.pdf">N3274</a></td>
168 <td class="full" align="center">Yes</td>
169 </tr>
170 <!-- Oct 2024 Papers -->
171 <tr>
172 <td>Floating-point exceptions for macro replacements</td>
173 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3286.pdf">N3286</a></td>
174 <td class="full" align="center">Yes</td>
175 </tr>
176 <tr>
177 <td>Obsolete implicitly octal literals and add delimited escape sequences</td>
178 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3353.htm">N3353</a></td>
179 <td class="none" align="center">No</td>
180 </tr>
181 <tr>
182 <td>'if' declarations, v2</td>
183 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3356.htm">N3356</a></td>
184 <td class="none" align="center">No</td>
185 </tr>
186 <tr>
187 <td>Allowing stricter alignment for atomic types</td>
188 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3312.pdf">N3312</a></td>
189 <td class="full" align="center">Yes</td>
190 </tr>
191 <tr>
192 <td>Slay Some Earthly Demons III</td>
193 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3341.pdf">N3341</a></td>
194 <td class="full" align="center">Yes</td>
195 </tr>
196 <tr>
197 <td>Slay Some Earthly Demons IV</td>
198 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3342.pdf">N3342</a></td>
199 <td class="full" align="center">Yes</td>
200 </tr>
201 <tr>
202 <td>Slay Some Earthly Demons VI</td>
203 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3344.pdf">N3344</a></td>
204 <td class="unreleased" align="center">Clang 20</td>
205 </tr>
206 <tr>
207 <td>Slay Some Earthly Demons VII</td>
208 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3345.pdf">N3345</a></td>
209 <td class="full" align="center">Yes</td>
210 </tr>
211 <tr>
212 <td>Slay Some Earthly Demons VIII</td>
213 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3346.pdf">N3346</a></td>
214 <td class="full" align="center">Yes</td>
215 </tr>
216 <tr>
217 <td>Introduce complex literals v. 2</td>
218 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3298.htm">N3298</a></td>
219 <td class="full" align="center">Yes</td>
220 </tr>
221 <tr>
222 <td>Allow zero length operations on null pointers</td>
223 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3322.pdf">N3322</a></td>
224 <td class="full" align="center">Yes</td>
225 </tr>
226 <tr>
227 <td>How do you add one to something?</td>
228 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3323.pdf">N3323</a></td>
229 <td class="full" align="center">Yes</td>
230 </tr>
231 <tr>
232 <td>Give consistent wording for SNAN initialization v3</td>
233 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3364.pdf">N3364</a></td>
234 <td class="full" align="center">Yes</td>
235 </tr>
236 <tr>
237 <td>Case range expressions v3.1</td>
238 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3370.htm">N3370</a></td>
239 <td class="full" align="center">Yes</td>
240 </tr>
241 <tr>
242 <td>New _Lengthof() operator (v4)</td>
243 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3369.pdf">N3369</a></td>
244 <td class="none" align="center">No</td>
245 </tr>
246 <tr>
247 <td>Named loops, v3</td>
248 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3355.htm">N3355</a></td>
249 <td class="none" align="center">No</td>
250 </tr>
251 </table>
252 </details>
254 <h2 id="c2x">C23 implementation status</h2>
256 <p>Clang has support for some of the features of the C standard following C17, informally referred to as C23.</p>
258 <p>You can use Clang in C23 mode with the <code>-std=c23</code> option (available in Clang 18 and later) or with the
259 <code>-std=c2x</code> option (available in Clang 9 and later).</p>
261 <details open>
262 <summary>List of features and minimum Clang version with support</summary>
264 <table width="689" border="1" cellspacing="0">
265 <tr>
266 <th>Language Feature</th>
267 <th>C23 Proposal</th>
268 <th>Available in Clang?</th>
269 </tr>
270 <!-- Pre-Oct 2019 Papers -->
271 <tr>
272 <td>Evaluation formats</td>
273 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2186.pdf">N2186</a></td>
274 <td class="unknown" align="center">Unknown</td>
275 </tr>
276 <tr>
277 <td>Harmonizing static_assert with C++</td>
278 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2265.pdf">N2665</a></td>
279 <td class="full" align="center">Clang 9</td>
280 </tr>
281 <tr>
282 <td>nodiscard attribute</td>
283 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2267.pdf">N2267</a></td>
284 <td class="full" align="center">Clang 9</td>
285 </tr>
286 <tr>
287 <td>maybe_unused attribute</td>
288 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2270.pdf">N2270</a></td>
289 <td class="full" align="center">Clang 9</td>
290 </tr>
291 <tr id="TS18661">
292 <td rowspan="9">TS 18661 Integration</td>
293 </tr>
294 <tr> <!-- Pre-Oct 2019 -->
295 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2314.pdf">N2314</a></td>
296 <td class="unknown" align="center">Unknown</td>
297 </tr>
298 <tr> <!-- Pre-Oct 2019 -->
299 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2341.pdf">N2341</a></td>
300 <td class="none" align="center">No</td>
301 </tr>
302 <tr> <!-- Pre-Oct 2019 -->
303 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2359.pdf">N2359</a></td>
304 <td class="none" align="center">No</td>
305 </tr>
306 <tr> <!-- Nov 2020 -->
307 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2546.pdf">N2546</a></td>
308 <td class="none" align="center">No</td>
309 </tr>
310 <tr> <!-- Apr 2021 -->
311 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2640.htm">N2640</a></td>
312 <td class="full" align="center">Yes</td>
313 </tr>
314 <tr> <!-- Sep 2021 -->
315 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2755.htm">N2755</a></td>
316 <td class="none" align="center">No</td>
317 </tr>
318 <tr> <!-- Feb 2022 -->
319 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2931.pdf">N2931</a></td>
320 <td class="none" align="center">No</td>
321 </tr>
322 <tr>
323 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2754.htm">N2754</a></td>
324 <td class="none" align="center">No</td>
325 </tr>
326 <tr>
327 <td>Preprocessor line numbers unspecified</td>
328 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2322.htm">N2322</a></td>
329 <td class="partial" align="center">
330 <details><summary>Partial</summary>
331 The line number associated with a macro invocation is not the line
332 number of the first character of the macro name in the invocation.
333 Additionally, Clang may not associate the line number of a pp-directive
334 with the first <code>#</code> token. As these are recommended practices
335 and not normative requirements, Clang's behavior is still conforming.
336 </details>
337 </td>
338 </tr>
339 <tr>
340 <td>deprecated attribute</td>
341 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2334.pdf">N2334</a></td>
342 <td class="full" align="center">Clang 9</td>
343 </tr>
344 <tr id="Attributes">
345 <td rowspan="3">Attributes</td>
346 </tr>
347 <tr> <!-- Pre-Oct 2019 -->
348 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2335.pdf">N2335</a></td>
349 <td class="full" align="center">Clang 9</td>
350 </tr>
351 <tr> <!-- Aug 2020 -->
352 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2554.pdf">N2554</a></td>
353 <td class="full" align="center">Clang 9</td>
354 </tr>
355 <tr>
356 <td>Defining new types in offsetof</td>
357 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2350.htm">N2350</a></td>
358 <td class="full" align="center">Yes</td>
359 </tr>
360 <tr>
361 <td>fallthrough attribute</td>
362 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2408.pdf">N2408</a></td>
363 <td class="full" align="center">Clang 9</td>
364 </tr>
365 <tr>
366 <td>Two's complement sign representation</td>
367 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2412.pdf">N2412</a></td>
368 <td class="full" align="center">Clang 14</td>
369 </tr>
370 <tr>
371 <td>Adding the u8 character prefix</td>
372 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2418.pdf">N2418</a></td>
373 <td class="full" align="center">Clang 15</td>
374 </tr>
375 <tr>
376 <td>Remove support for function definitions with identifier lists</td>
377 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2432.pdf">N2432</a></td>
378 <td class="full" align="center">Clang 15</td>
379 </tr>
380 <!-- Oct 2019 Papers -->
381 <!-- WG14 N2379 *_IS_IEC_60559 feature test macros was removed by a later
382 change to C23. -->
383 <tr>
384 <td>Annex F.8 update for implementation extensions and rounding</td>
385 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2384.pdf">N2384</a></td>
386 <td class="unknown" align="center">Unknown</td>
387 </tr>
388 <tr>
389 <td>_Bool definitions for true and false</td>
390 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2393.pdf">N2393</a></td>
391 <td class="na" align="center">Subsumed by N2935</td>
392 </tr>
393 <!-- Mar 2020 Papers -->
394 <tr>
395 <td>[[nodiscard("should have a reason")]]</td>
396 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2448.pdf">N2448</a></td>
397 <td class="full" align="center">Clang 10</td>
398 </tr>
399 <tr>
400 <td>Allowing unnamed parameters in function definitions</td>
401 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2480.pdf">N2480</a></td>
402 <td class="full" align="center">Clang 11</td>
403 </tr>
404 <!-- Aug 2020 Papers -->
405 <tr>
406 <td>Free positioning of labels inside compound statements</td>
407 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2508.pdf">N2508</a></td>
408 <td class="full" align="center">Clang 18</td>
409 </tr>
410 <tr>
411 <td>Querying attribute support</td>
412 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2553.pdf">N2553</a></td>
413 <td class="full" align="center">Clang 9</td>
414 </tr>
415 <!-- Nov 2020 Papers -->
416 <tr>
417 <td>Binary literals</td>
418 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2549.pdf">N2549</a></td>
419 <td class="full" align="center">Clang 9</td>
420 </tr>
421 <tr>
422 <td>Allow duplicate attributes</td>
423 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2557.pdf">N2557</a></td>
424 <td class="full" align="center">Clang 13</td>
425 </tr>
426 <tr>
427 <td>Character encoding of diagnostic text</td>
428 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2563.pdf">N2563</a></td>
429 <td class="full" align="center">Yes</td>
430 </tr>
431 <tr>
432 <td>What we think we reserve</td>
433 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2572.pdf">N2572</a></td>
434 <td class="partial" align="center">Partial</td>
435 </tr>
436 <tr>
437 <td>Remove mixed wide string literal concatenation</td>
438 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2594.htm">N2594</a></td>
439 <td class="full" align="center">Clang 9</td>
440 </tr>
441 <tr>
442 <td>Update to IEC 60559:2020</td>
443 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2600.pdf">N2600</a></td>
444 <td class="unknown" align="center">Unknown</td>
445 </tr>
446 <tr>
447 <td>Compatibility of Pointers to Arrays with Qualifiers</td>
448 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2607.pdf">N2607</a></td>
449 <td class="partial" align="center">
450 <details><summary>Partial</summary>
451 Much of the proposal is implemented, but Clang lacks pedantic diagnostics
452 in C17 and earlier regarding use of incompatible pointer types as an
453 extension. Further, Clang does not properly compute the correct result
454 type for the <code>?:</code> operator when the result type should be a
455 qualified array type.
456 </details>
457 </td>
458 </tr>
459 <tr>
460 <td>Unclear type relationship between a format specifier and its argument</td>
461 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2562.pdf">N2562</a></td>
462 <td class="full" align="center">Clang 16</td>
463 </tr>
464 <!-- Apr 2021 Papers -->
465 <tr>
466 <td>String functions for freestanding implementations</td>
467 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2524.htm">N2524</a></td>
468 <td class="none" align="center">No</td>
469 </tr>
470 <tr>
471 <td>Digit separators</td>
472 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2626.pdf">N2626</a></td>
473 <td class="full" align="center">Clang 13</td>
474 </tr>
475 <tr>
476 <td>Missing +(x) in table</td>
477 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2641.htm">N2641</a></td>
478 <td class="full" align="center">Yes</td>
479 </tr>
480 <tr>
481 <td>Add support for preprocessing directives elifdef and elifndef</td>
482 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2645.pdf">N2645</a></td>
483 <td class="full" align="center">Clang 13</td>
484 </tr>
485 <!-- Jun 2021 Papers -->
486 <tr>
487 <td>[[maybe_unused]] for labels</td>
488 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2662.pdf">N2662</a></td>
489 <td class="full" align="center">Clang 16</td>
490 </tr>
491 <tr>
492 <td>Zeros compare equal</td>
493 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2670.pdf">N2670</a></td>
494 <td class="full" align="center">Yes</td>
495 </tr>
496 <tr>
497 <td>Negative values</td>
498 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2671.pdf">N2671</a></td>
499 <td class="full" align="center">Yes</td>
500 </tr>
501 <tr>
502 <td>5.2.4.2.2 cleanup</td>
503 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2672.pdf">N2672</a></td>
504 <td class="full" align="center">Yes</td>
505 </tr>
506 <tr>
507 <td>Towards Integer Safety</td>
508 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2683.pdf">N2683</a></td>
509 <td class="full" align="center">Clang 18</td>
510 </tr>
511 <tr id="_BitInt">
512 <td rowspan="5">Adding Fundamental Type for N-bit Integers</td>
513 </tr>
514 <tr> <!-- Jun 2021 -->
515 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2763.pdf">N2763</a></td>
516 <td class="full" align="center">Clang 15</td>
517 </tr>
518 <tr> <!-- Feb 2022 -->
519 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2775.pdf">N2775</a></td>
520 <td class="full" align="center">Clang 15</td>
521 </tr>
522 <tr> <!-- Jul 2022 -->
523 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2969.htm">N2969</a></td>
524 <td class="full" align="center">Clang 15</td>
525 </tr>
526 <tr> <!-- Jul 2022 -->
527 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3035.pdf">N3035</a></td>
528 <td class="full" align="center">Clang 15</td>
529 </tr>
530 <!-- Sep 2021 Papers -->
531 <tr>
532 <td>#warning directive</td>
533 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2686.pdf">N2686</a></td>
534 <td class="full" align="center">Yes</td>
535 </tr>
536 <tr>
537 <td>Sterile characters</td>
538 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2688.pdf">N2686</a></td>
539 <td class="full" align="center">Yes</td>
540 </tr>
541 <tr>
542 <td>Numerically equal</td>
543 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2716.htm">N2716</a></td>
544 <td class="full" align="center">Yes</td>
545 </tr>
546 <tr>
547 <td>char16_t & char32_t string literals shall be UTF-16 & UTF-32</td>
548 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2728.htm">N2728</a></td>
549 <td class="full" align="center">Yes</td>
550 </tr>
551 <tr>
552 <td>IEC 60559 binding</td>
553 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2749.pdf">N2749</a></td>
554 <td class="unknown" align="center">Unknown</td>
555 </tr>
556 <tr>
557 <td>__has_include for C</td>
558 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2799.pdf">N2799</a></td>
559 <td class="full" align="center">Yes</td>
560 </tr>
561 <!-- Dec 2021 Papers -->
562 <tr>
563 <td>Annex F overflow and underflow</td>
564 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2747.pdf">N2747</a></td>
565 <td class="full" align="center">Yes</td>
566 </tr>
567 <tr>
568 <td>Remove UB from Incomplete Types in Function Parameters</td>
569 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2770.pdf">N2770</a></td>
570 <td class="full" align="center">Yes</td>
571 </tr>
572 <tr>
573 <td>Variably-modified types</td>
574 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2778.pdf">N2778</a></td>
575 <td class="full" align="center">Yes</td>
576 </tr>
577 <tr>
578 <td>Types do not have types</td>
579 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2781.pdf">N2781</a></td>
580 <td class="full" align="center">Yes</td>
581 </tr>
582 <tr>
583 <td>5.2.4.2.2 cleanup (N2672 update)</td>
584 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2806.pdf">N2806</a></td>
585 <td class="full" align="center">Yes</td>
586 </tr>
587 <tr>
588 <td>Allow 16-bit ptrdiff_t</td>
589 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2808.htm">N2808</a></td>
590 <td class="full" align="center">Yes</td>
591 </tr>
592 <tr>
593 <td>Proposal to update CFP freestanding requirements</td>
594 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2823.pdf">N2823</a></td>
595 <td class="unknown" align="center">Unknown</td>
596 </tr>
597 <tr>
598 <td>Types and sizes</td>
599 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2838.htm">N2838</a></td>
600 <td class="full" align="center">Yes</td>
601 </tr>
602 <tr>
603 <td>Clarifying integer terms</td>
604 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2837.pdf">N2837</a></td>
605 <td class="full" align="center">Yes</td>
606 </tr>
607 <tr>
608 <td>Clarification for max exponent macros</td>
609 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2843.pdf">N2843</a></td>
610 <td class="na" align="center">Subsumed by N2882</td>
611 </tr>
612 <tr>
613 <td>Clarification about expression transformations</td>
614 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2846.pdf">N2846</a></td>
615 <td class="unknown" align="center">Unknown</td>
616 </tr>
617 <tr>
618 <td>Contradiction about INFINITY macro</td>
619 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2848.pdf">N2848</a></td>
620 <td class="full" align="center">Clang 19</td>
621 </tr>
622 <tr>
623 <td>Require exact-width integer type interfaces</td>
624 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2872.htm">N2872</a></td>
625 <td class="full" align="center">Yes</td>
626 </tr>
627 <!-- Feb 2022 (Parts 1 & 2) Papers -->
628 <tr>
629 <td>@, $, and ‘ in the source/execution character set</td>
630 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2701.htm">N2701</a></td>
631 <td class="full" align="center">Yes</td>
632 </tr>
633 <tr>
634 <td>The noreturn attribute</td>
635 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2764.pdf">N2764</a></td>
636 <td class="full" align="center">Clang 15</td>
637 </tr>
638 <tr>
639 <td>*_HAS_SUBNORM==0 implies what?</td>
640 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2797.htm">N2797</a></td>
641 <td class="full" align="center">Yes</td>
642 </tr>
643 <tr>
644 <td>Disambiguate the storage class of some compound literals</td>
645 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2819.pdf">N2819</a></td>
646 <td class="none" align="center">No</td>
647 </tr>
648 <tr>
649 <td>Add annotations for unreachable control flow v2</td>
650 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2826.pdf">N2826</a></td>
651 <td class="full" align="center">Clang 17</td>
652 </tr>
653 <tr>
654 <td>Unicode Sequences More Than 21 Bits are a Constraint Violation r0</td>
655 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2828.htm">N2828</a></td>
656 <td class="full" align="center">Clang 3.6</td>
657 </tr>
658 <tr>
659 <td>Identifier Syntax using Unicode Standard Annex 31</td>
660 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2836.pdf">N2836</a></td>
661 <td class="full" align="center">Clang 15</td>
662 </tr>
663 <tr>
664 <td>No function declarators without prototypes</td>
665 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2841.htm">N2841</a></td>
666 <td class="full" align="center">Clang 15</td>
667 </tr>
668 <tr>
669 <td>Remove default argument promotions for _FloatN types</td>
670 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2844.pdf">N2844</a></td>
671 <td class="none" align="center">No</td>
672 </tr>
673 <tr>
674 <td>Revised Suggestions of Change for Numerically Equal/Equivalent</td>
675 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2847.pdf">N2847</a></td>
676 <td class="full" align="center">Yes</td>
677 </tr>
678 <tr>
679 <td>5.2.4.2.2 Cleanup, Again Again (N2806 update)</td>
680 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2879.pdf">N2879</a></td>
681 <td class="full" align="center">Yes</td>
682 </tr>
683 <tr>
684 <td>char8_t: A type for UTF-8 characters and strings</td>
685 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2653.htm">N2653</a></td>
686 <td class="full" align="center">Clang 19</td>
687 </tr>
688 <tr>
689 <td>Clarification for max exponent macros-update</td>
690 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2882.pdf">N2882</a></td>
691 <td class="unknown" align="center">Unknown</td>
692 </tr>
693 <tr id="InitializationWithCurlyBraces">
694 <td rowspan="3">Consistent, Warningless, and Intuitive Initialization with {}</td>
695 </tr>
696 <tr> <!-- Feb 2022 -->
697 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2900.htm">N2900</a></td>
698 <td class="full" align="center">Clang 17</td>
699 </tr>
700 <tr> <!-- Jul 2022 -->
701 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3011.htm">N3011</a></td>
702 <td class="full" align="center">Clang 17</td>
703 </tr>
704 <tr id="typeof">
705 <td rowspan="3">Not-so-magic: typeof</td>
706 </tr>
707 <tr> <!-- Feb 2022 -->
708 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2927.htm">N2927</a></td>
709 <td class="full" align="center">Clang 16</td>
710 </tr>
711 <tr> <!-- Jul 2022 -->
712 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2930.pdf">N2930</a></td>
713 <td class="full" align="center">Clang 16</td>
714 </tr>
715 <tr>
716 <td>Revise spelling of keywords v7</td>
717 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2934.pdf">N2934</a></td>
718 <td class="full" align="center">Clang 17</td>
719 </tr>
720 <tr>
721 <td>Make false and true first-class language features v8</td>
722 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2935.pdf">N2935</a></td>
723 <td class="full" align="center">Clang 15</td>
724 </tr>
725 <tr>
726 <td>Properly define blocks as part of the grammar v3</td>
727 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2937.pdf">N2937</a></td>
728 <td class="full" align="center">Yes</td>
729 </tr>
730 <!-- May 2022 Papers -->
731 <tr>
732 <td>Annex X (replacing Annex H) for IEC 60559 interchange</td>
733 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2601.pdf">N2601</a></td>
734 <td class="none" align="center">No</td>
735 </tr>
736 <tr>
737 <td>Indeterminate Values and Trap Representations</td>
738 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2861.pdf">N2861</a></td>
739 <td class="full" align="center">Yes</td>
740 </tr>
741 <tr>
742 <td>Remove ATOMIC_VAR_INIT v2</td>
743 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2886.htm">N2886</a></td>
744 <td class="full" align="center">Clang 17</td>
745 </tr>
746 <tr>
747 <td>Require exact-width integer type interfaces v2</td>
748 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2888.htm">N2888</a></td>
749 <td class="full" align="center">Yes</td>
750 </tr>
751 <tr>
752 <td>Wording Change for Variably-Modified Types</td>
753 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2992.pdf">N2992</a></td>
754 <td class="full" align="center">Yes</td>
755 </tr>
756 <!-- Jul 2022 Papers -->
757 <tr>
758 <td>Identifier syntax fixes</td>
759 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2939.pdf">N2939</a></td>
760 <td class="full" align="center">Clang 15</td>
761 </tr>
762 <tr>
763 <td>Remove trigraphs??!</td>
764 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2940.pdf">N2940</a></td>
765 <td class="full" align="center">Clang 18</td>
766 </tr>
767 <tr>
768 <td>Improved normal enumerations</td>
769 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3029.htm">N3029</a></td>
770 <td class="unreleased" align="center">Clang 20</td>
771 </tr>
772 <tr>
773 <td>Relax requirements for va_start</td>
774 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2975.pdf">N2975</a></td>
775 <td class="full" align="center">Clang 16</td>
776 </tr>
777 <tr>
778 <td>Enhanced enumerations</td>
779 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3030.htm">N3030</a></td>
780 <td class="unreleased" align="center">Clang 20</td>
781 </tr>
782 <tr>
783 <td>Freestanding C and IEC 60559 conformance scope reduction</td>
784 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2951.htm">N2951</a></td>
785 <td class="unknown" align="center">Unknown</td>
786 </tr>
787 <tr>
788 <td>Unsequenced functions</td>
789 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2956.htm">N2956</a></td>
790 <td class="none" align="center">No</td>
791 </tr>
792 <tr>
793 <td>Comma ommission and deletion (__VA_OPT__)</td>
794 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3033.htm">N3033</a></td>
795 <td class="full" align="center">Clang 12</td>
796 </tr>
797 <tr>
798 <td>Underspecified object definitions</td>
799 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3006.htm">N3006</a></td>
800 <td class="none" align="center">No</td>
801 </tr>
802 <tr>
803 <td>Type inference for object declarations</td>
804 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3007.htm">N3007</a></td>
805 <td class="full" align="center">Clang 18</td>
806 </tr>
807 <tr>
808 <td>constexpr for object definitions</td>
809 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3018.htm">N3018</a></td>
810 <td class="full" align="center">Clang 19</td>
811 </tr>
812 <tr>
813 <td>Introduce storage class specifiers for compound literals</td>
814 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3038.htm">N3038</a></td>
815 <td class="none" align="center">No</td>
816 </tr>
817 <tr>
818 <td>Identifier primary expressions</td>
819 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3034.pdf">N3034</a></td>
820 <td class="full" align="center">Yes</td>
821 </tr>
822 <tr>
823 <td>Introduce the nullptr constant</td>
824 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3042.htm">N3042</a></td>
825 <td class="full" align="center">Clang 17</td>
826 </tr>
827 <tr>
828 <td>Memory layout of unions</td>
829 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2929.pdf">N2929</a></td>
830 <td class="full" align="center">Yes</td>
831 </tr>
832 <tr>
833 <td>Improved tag compatibility</td>
834 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3037.pdf">N3037</a></td>
835 <td class="none" align="center">No</td>
836 </tr>
837 <tr>
838 <td>#embed</td>
839 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3017.htm">N3017</a></td>
840 <td class="full" align="center">Clang 19</td>
841 </tr>
842 </table>
843 </details>
845 <h2 id="c17">C17 implementation status</h2>
847 <p>There are no major changes in this edition, only technical corrections and clarifications that are tracked by Defect Report.</p>
848 <p>You can use Clang in C17 mode with the <code>-std=c17</code> or <code>-std=c18</code> options (available in Clang 6 and later).</p>
850 <h2 id="c11">C11 implementation status</h2>
852 <p>Clang implements a significant portion of the ISO 9899:2011 (C11) standard, but the status of individual proposals is still under investigation.</p>
853 <p>You can use Clang in C11 mode with the <code>-std=c11</code> option (use <code>-std=c1x</code> in Clang 3.0 and earlier).</p>
855 <details open>
856 <summary>List of features and minimum Clang version with support</summary>
858 <table width="689" border="1" cellspacing="0">
859 <tr>
860 <th>Language Feature</th>
861 <th>C11 Proposal</th>
862 <th>Available in Clang?</th>
863 </tr>
864 <tr>
865 <td>A finer-grained specification for sequencing</td>
866 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1252.htm">N1252</a></td>
867 <td class="unknown" align="center">Unknown</td>
868 </tr>
869 <tr>
870 <td>Clarification of expressions</td>
871 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1282.pdf">N1282</a></td>
872 <td class="full" align="center">Yes</td>
873 </tr>
874 <tr>
875 <td>Extending the lifetime of temporary objects (factored approach)</td>
876 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1285.htm">N1285</a></td>
877 <td class="none" align="center">No</td>
878 </tr>
879 <tr>
880 <td>Requiring signed char to have no padding bits</td>
881 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1310.htm">N1310</a></td>
882 <td class="full" align="center">Yes</td>
883 </tr>
884 <tr>
885 <td>Initializing static or external variables</td>
886 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1311.pdf">N1311</a></td>
887 <td class="full" align="center">Yes</td>
888 </tr>
889 <tr>
890 <td>Conversion between pointers and floating types</td>
891 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1316.htm">N1316</a></td>
892 <td class="full" align="center">Yes</td>
893 </tr>
894 <tr>
895 <td>Adding TR 19769 to the C Standard Library</td>
896 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1326.pdf">N1326</a></td>
897 <td class="full" align="center">Clang 3.3</td>
898 </tr>
899 <tr>
900 <td>Static assertions</td>
901 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1330.pdf">N1330</a></td>
902 <td class="full" align="center">Yes</td>
903 </tr>
904 <tr>
905 <td>Parallel memory sequencing model proposal</td>
906 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1349.htm">N1349</a></td>
907 <td class="unknown" align="center">Unknown</td>
908 </tr>
909 <tr>
910 <td>_Bool bit-fields</td>
911 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1356.htm">N1356</a></td>
912 <td class="full" align="center">Yes</td>
913 </tr>
914 <tr>
915 <td>Technical corrigendum for C1X</td>
916 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1359.htm">N1359</a></td>
917 <td class="full" align="center">Yes</td>
918 <!-- The DRs listed in the paper are individually tested in clang/test/C/drs/dr3xx.c and others -->
919 </tr>
920 <tr>
921 <td>Benign typedef redefinition</td>
922 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1360.htm">N1360</a></td>
923 <td class="full" align="center">Clang 3.1</td>
924 </tr>
925 <tr>
926 <td>Thread-local storage</td>
927 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1364.htm">N1364</a></td>
928 <td class="full" align="center">Clang 3.3</td>
929 </tr>
930 <tr>
931 <td>Constant expressions</td>
932 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1365.htm">N1365</a></td>
933 <td class="full" align="center">Clang 16</td>
934 </tr>
935 <tr>
936 <td>Contractions and expression evaluation methods</td>
937 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1367.htm">N1367</a></td>
938 <td class="unknown" align="center">Unknown</td>
939 </tr>
940 <tr>
941 <td>Floating-point to int/_Bool conversions</td>
942 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1391.htm">N1391</a></td>
943 <td class="full" align="center">Yes</td>
944 </tr>
945 <tr>
946 <td>Wide function returns (alternate proposal)</td>
947 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1396.htm">N1396</a></td>
948 <td class="full" align="center">
949 <details><summary>Yes*</summary>
950 Clang conforms to this paper on all targets except 32-bit x86 without
951 SSE2. However, Clang does not claim conformance to Annex F on any
952 target and does not intend to ever conform to Annex F on that specific
953 target, so no changes are needed to conform to this paper.
954 </details>
955 </td>
956 </tr>
957 <tr id="alignment">
958 <td rowspan="3">Alignment</td>
959 </tr>
960 <tr>
961 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1397.htm">N1397</a></td>
962 <td class="full" align="center">Clang 3.2</td>
963 </tr>
964 <tr>
965 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1447.htm">N1447</a></td>
966 <td class="full" align="center">Clang 3.2</td>
967 </tr>
968 <tr>
969 <td>Anonymous member-structures and unions (modulo "name lookup")</td>
970 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1406.pdf">N1406</a></td>
971 <td class="full" align="center">Yes</td>
972 </tr>
973 <tr>
974 <td>Completeness of types</td>
975 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1439.pdf">N1439</a></td>
976 <td class="full" align="center">Yes</td>
977 </tr>
978 <tr>
979 <td>Generic macro facility</td>
980 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1441.htm">N1441</a></td>
981 <td class="full" align="center">Yes</td>
982 </tr>
983 <tr>
984 <td>Dependency ordering for C memory model</td>
985 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1444.htm">N1444</a></td>
986 <td class="unknown" align="center">Unknown</td>
987 </tr>
988 <tr>
989 <td>Subsetting the standard</td>
990 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1460.htm">N1460</a></td>
991 <td class="full" align="center">Yes</td>
992 </tr>
993 <tr>
994 <td>Assumed types in F.9.2</td>
995 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1468.htm">N1468</a></td>
996 <td class="unknown" align="center">Unknown</td>
997 </tr>
998 <tr>
999 <td>Supporting the 'noreturn' property in C1x</td>
1000 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1478.htm">N1478</a></td>
1001 <td class="full" align="center">Clang 3.3</td>
1002 </tr>
1003 <tr>
1004 <td>Updates to C++ memory model based on formalization</td>
1005 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1480.htm">N1480</a></td>
1006 <td class="unknown" align="center">Unknown</td>
1007 </tr>
1008 <tr>
1009 <td>Explicit initializers for atomics</td>
1010 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1482.htm">N1482</a></td>
1011 <td class="full" align="center">Clang 4</td>
1012 </tr>
1013 <tr>
1014 <td>Atomics proposal (minus ternary op)</td>
1015 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1485.pdf">N1485</a></td>
1016 <td class="full" align="center">Yes</td>
1017 </tr>
1018 <tr>
1019 <td>UTF-8 string literals</td>
1020 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1488.htm">N1488</a></td>
1021 <td class="full" align="center">Clang 3.3</td>
1022 </tr>
1023 <tr>
1024 <td>Optimizing away infinite loops</td>
1025 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1509.pdf">N1509</a></td>
1026 <td class="full" align="center">Yes</td>
1027 </tr>
1028 <tr>
1029 <td>Conditional normative status for Annex G</td>
1030 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1514.pdf">N1514</a></td>
1031 <td class="full" align="center">Yes <a href="#annex-g">(1)</a></td>
1032 </tr>
1033 <tr>
1034 <td>Creation of complex value</td>
1035 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1464.htm">N1464</a></td>
1036 <td class="full" align="center">Clang 12</td>
1037 </tr>
1038 <tr>
1039 <td>Recommendations for extended identifier characters for C and C++</td>
1040 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1518.htm">N1518</a></td>
1041 <td class="unknown" align="center">Unknown</td>
1042 </tr>
1043 <tr>
1044 <td>Atomic C1x/C++0x compatibility refinements (1st part only)</td>
1045 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1526.pdf">N1526</a></td>
1046 <td class="full" align="center">Yes</td>
1047 </tr>
1048 <tr>
1049 <td>Atomic bitfields implementation defined</td>
1050 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1530.pdf">N1530</a></td>
1051 <td class="full" align="center">Yes</td>
1052 </tr>
1053 <tr>
1054 <td>Small fix for the effect of alignment on struct/union type compatibility</td>
1055 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1532.htm">N1532</a></td>
1056 <td class="full" align="center">Yes</td>
1057 </tr>
1058 <tr>
1059 <td>Clarification for wide evaluation</td>
1060 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1531.pdf">N1531</a></td>
1061 <td class="unknown" align="center">Unknown</td>
1062 </tr>
1063 </table>
1064 <span id="annex-g">(1): Clang does not implement Annex G, so our conditional support
1065 conforms by not defining the <code>__STDC_IEC_559_COMPLEX__</code> macro.
1066 </span>
1067 </details>
1069 <h2 id="c99">C99 implementation status</h2>
1071 <p>Clang implements all of the ISO 9899:1999 (C99) standard.</p>
1072 <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>
1073 <!-- https://www.open-std.org/jtc1/sc22/wg14/www/docs/n874.htm contains the
1074 final editor's report of what's been added to C99, but it includes more
1075 papers than are worth listing because it includes editorial and cleanup
1076 proposals in addition to feature proposals. When a paper is not available,
1077 I list the paper number from the editor's report, but do not hyperlink it.
1078 When I can't map the feature back to a paper, I mark it as unknown. -->
1079 <p>You can use Clang in C99 mode with the <code>-std=c99</code> option.</p>
1081 <details open>
1082 <summary>List of features and minimum Clang version with support</summary>
1084 <table width="689" border="1" cellspacing="0">
1085 <tr>
1086 <th>Language Feature</th>
1087 <th>C99 Proposal</th>
1088 <th>Available in Clang?</th>
1089 </tr>
1090 <tr>
1091 <td>restricted character set support via digraphs and &lt;iso646.h&gt;</td>
1092 <td>Unknown</td>
1093 <td class="full" align="center">Yes</td>
1094 </tr>
1095 <tr>
1096 <td>more precise aliasing rules via effective type</td>
1097 <td>Unknown</td>
1098 <td class="full" align="center">Yes</td>
1099 </tr>
1100 <tr>
1101 <td>restricted pointers</td>
1102 <td>N448</td>
1103 <td class="partial" align="center">
1104 <details><summary>Partial</summary>
1105 Clang's support for <code>restrict</code> is fully conforming but
1106 considered only partially implemented. Clang implements all of the
1107 constraints required for <code>restrict</code> support, but LLVM only
1108 supports <code>restrict</code> optimization semantics for restricted
1109 pointers used as function parameters; it does not fully support the
1110 semantics for restrict on local variables or data members.
1111 </details>
1112 </td>
1113 </tr>
1114 <tr>
1115 <td>variable length arrays</td>
1116 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n683.htm">N683</a></td>
1117 <td class="full" align="center">Yes</td>
1118 </tr>
1119 <tr>
1120 <td>flexible array members</td>
1121 <td>Unknown</td>
1122 <td class="full" align="center">Yes</td>
1123 </tr>
1124 <tr>
1125 <td>static and type qualifiers in parameter array declarators</td>
1126 <td>Unknown</td>
1127 <td class="full" align="center">Yes</td>
1128 </tr>
1129 <tr>
1130 <td>complex and imaginary support in &lt;complex.h&gt;</td>
1131 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n693.ps">N693</a></td>
1132 <td class="partial" align="center">
1133 <details><summary>Partial</summary>
1134 Clang supports <code>_Complex</code> type specifiers but does not
1135 support <code>_Imaginary</code> type specifiers. Support for
1136 <code>_Imaginary</code> is optional in C99 and Clang does not claim
1137 conformance to Annex G.<br />
1138 <br />
1139 <code>_Complex</code> support requires an underlying support library
1140 such as compiler-rt to provide functions like <code>__divsc3</code>.
1141 Compiler-rt isn't linked in automatically in MSVC style environments.
1142 </details>
1143 </td>
1144 </tr>
1145 <tr>
1146 <td>type-generic math macros in &lt;tgmath.h&gt;</td>
1147 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n693.ps">N693</a></td>
1148 <td class="full" align="center">Yes</td>
1149 </tr>
1150 <tr>
1151 <td>the long long int type</td>
1152 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n601.ps">N601</a></td>
1153 <td class="full" align="center">Yes</td>
1154 </tr>
1155 <tr>
1156 <td>increase minimum translation limits</td>
1157 <td>N590</td>
1158 <td class="full" align="center">Clang 3.2</td>
1159 </tr>
1160 <tr>
1161 <td>additional floating-point characteristics in &lt;float.h&gt;</td>
1162 <td>Unknown</td>
1163 <td class="full" align="center">Clang 16</td>
1164 </tr>
1165 <tr id="implicit int">
1166 <td rowspan="4">remove implicit int</td>
1167 </tr>
1168 <tr>
1169 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n635.htm">N635</a></td>
1170 <td class="full" align="center">Yes</td>
1171 </tr>
1172 <tr>
1173 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n692.htm">N692</a></td>
1174 <td class="full" align="center">Yes</td>
1175 </tr>
1176 <tr>
1177 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n722.htm">N722</a></td>
1178 <td class="full" align="center">Yes</td>
1179 </tr>
1180 <tr>
1181 <td>reliable integer division</td>
1182 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n617.htm">N617</a></td>
1183 <td class="full" align="center">Yes</td>
1184 </tr>
1185 <tr>
1186 <td>universal character names (\u and \U)</td>
1187 <td>Unknown</td>
1188 <td class="full" align="center">Yes</td>
1189 </tr>
1190 <tr>
1191 <td>extended identifiers</td>
1192 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n717.htm">N717</a></td>
1193 <td class="full" align="center">Clang 17</td>
1194 </tr>
1195 <tr>
1196 <td>hexadecimal floating-point constants</td>
1197 <td>N308</td>
1198 <!-- This is a total guess. N874 makes no mention of N308 being accepted,
1199 but it does mention *use* of hexadecimal floating-point constants in
1200 the Menlo Park minutes associated with N787. -->
1201 <td class="full" align="center">Yes</td>
1202 </tr>
1203 <tr>
1204 <td>compound literals</td>
1205 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n716.htm">N716</a></td>
1206 <td class="full" align="center">Yes</td>
1207 </tr>
1208 <tr>
1209 <td>designated initializers</td>
1210 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n494.pdf">N494</a></td>
1211 <td class="full" align="center">Yes</td>
1212 </tr>
1213 <tr>
1214 <td>// comments</td>
1215 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n644.htm">N644</a></td>
1216 <td class="full" align="center">Yes</td>
1217 </tr>
1218 <tr>
1219 <td>extended integer types and library functions in &lt;inttypes.h&gt; and &lt;stdint.h&gt;</td>
1220 <td>Unknown</td>
1221 <!-- Seems to be related to https://www.open-std.org/jtc1/sc22/wg14/www/docs/n788.htm
1222 but that does not have any content for stdint.h. The next paper I could find on
1223 the topic was https://www.open-std.org/jtc1/sc22/wg14/www/docs/n851.htm but that
1224 implies stdint.h was already added. -->
1225 <td class="full" align="center">Yes</td>
1226 </tr>
1227 <tr>
1228 <td>remove implicit function declaration</td>
1229 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n636.htm">N636</a></td>
1230 <td class="full" align="center">Yes</td>
1231 </tr>
1232 <tr>
1233 <td>preprocessor arithmetic done in intmax_t/uintmax_t</td>
1234 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n736.htm">N736</a></td>
1235 <td class="full" align="center">Yes</td>
1236 </tr>
1237 <tr>
1238 <td>mixed declarations and code</td>
1239 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n740.htm">N740</a></td>
1240 <td class="full" align="center">Yes</td>
1241 </tr>
1242 <tr>
1243 <td>new block scopes for selection and iteration statements</td>
1244 <td>Unknown</td>
1245 <td class="full" align="center">Yes</td>
1246 </tr>
1247 <tr>
1248 <td>integer constant type rules</td>
1249 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n629.htm">N629</a></td>
1250 <td class="full" align="center">Yes</td>
1251 </tr>
1252 <tr>
1253 <td>integer promotion rules</td>
1254 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n725.htm">N725</a></td>
1255 <td class="full" align="center">Yes</td>
1256 </tr>
1257 <tr>
1258 <td>macros with a variable number of arguments</td>
1259 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n707.htm">N707</a></td>
1260 <td class="full" align="center">Yes</td>
1261 </tr>
1262 <tr>
1263 <td>IEC 60559 support</td>
1264 <td>Unknown</td>
1265 <td class="partial" align="center">
1266 <details><summary>Partial</summary>
1267 Clang supports much of the language requirements for Annex F, but
1268 full conformance is only possible to determine when considering the
1269 compiler's language support, the C runtime library's math library
1270 support, and the target system's floating-point environment support.
1271 Clang does not currently raise an "invalid" floating-point exception
1272 on certain conversions, does not raise floating-point exceptions for
1273 arithmetic constant expressions, and other corner cases. Note, Clang
1274 does not define <code>__STDC_IEC_559__</code> because the compiler
1275 does not fully conform. However, some C standard library
1276 implementations
1277 (<a href="https://sourceware.org/git/?p=glibc.git;a=blob;f=include/stdc-predef.h">
1278 glibc</a>, <a href="https://git.musl-libc.org/cgit/musl/tree/include/stdc-predef.h">
1279 musl</a> will define the macro regardless of compiler support unless
1280 the compiler defines <code>__GCC_IEC_559</code>, which Clang does not
1281 currently define.<br>
1282 Additionally, Clang intentionally will not conform to Annex F on
1283 32-bit x86 without SSE2 due to the behavior of floating-point
1284 operations in x87.
1285 </details>
1286 </td>
1287 </tr>
1288 <tr>
1289 <td>trailing comma allowed in enum declaration</td>
1290 <td>Unknown</td>
1291 <td class="full" align="center">Yes</td>
1292 </tr>
1293 <tr>
1294 <td>inline functions</td>
1295 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n741.htm">N741</a></td>
1296 <td class="full" align="center">Yes</td>
1297 </tr>
1298 <tr>
1299 <td>boolean type in &lt;stdbool.h&gt;</td>
1300 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n815.htm">N815</a></td>
1301 <td class="full" align="center">Yes</td>
1302 </tr>
1303 <tr>
1304 <td>idempotent type qualifiers</td>
1305 <td>N505</td>
1306 <td class="full" align="center">Yes</td>
1307 </tr>
1308 <tr>
1309 <td>empty macro arguments</td>
1310 <td>N570</td>
1311 <td class="full" align="center">Yes</td>
1312 </tr>
1313 <tr>
1314 <td>additional predefined macro names</td>
1315 <td>Unknown</td>
1316 <td class="full" align="center">Yes</td>
1317 <!-- It is unknown which paper brought in this change, which was listed in
1318 the C99 front matter. After hunting around for what these changes are,
1319 I found a mention in the C99 rationale document that implementers who
1320 wish to add their own predefined macros must not start them with
1321 __STDC_, which was a new restriction in C99. As best I can tell, that
1322 is what this particular feature is about. -->
1323 </tr>
1324 <tr>
1325 <td>_Pragma preprocessing operator</td>
1326 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n634.ps">N634</a></td>
1327 <!-- This may not be quite right as it proposes a `pragma` operator and
1328 not a _Pragma operator. However, I didn't see further papers on the
1329 renamed form, so I assume this was accepted with modification. -->
1330 <td class="full" align="center">Yes</td>
1331 </tr>
1332 <tr id="standard pragmas">
1333 <td rowspan="3">standard pragmas</td>
1334 </tr>
1335 <tr>
1336 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n631.htm">N631</a></td>
1337 <td class="full" align="center">Yes</td>
1338 </tr>
1339 <tr>
1340 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n696.ps">N696</a></td>
1341 <td class="full" align="center">Yes</td>
1342 </tr>
1343 <tr>
1344 <td>__func__ predefined identifier</td>
1345 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n611.ps">N611</a></td>
1346 <td class="full" align="center">Yes</td>
1347 </tr>
1348 <tr>
1349 <td>va_copy macro</td>
1350 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n671.htm">N671</a></td>
1351 <td class="full" align="center">Yes</td>
1352 </tr>
1353 <tr>
1354 <td>remove deprecation of aliased array parameters</td>
1355 <td>Unknown</td>
1356 <td class="full" align="center">Yes</td>
1357 </tr>
1358 <tr>
1359 <td>conversion of array to pointer not limited to lvalues</td>
1360 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n835.pdf">N835</a></td>
1361 <td class="full" align="center">Yes</td>
1362 </tr>
1363 <tr>
1364 <td>relaxed constraints on aggregate and union initialization</td>
1365 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n782.htm">N782</a></td>
1366 <td class="full" align="center">Clang 3.4</td>
1367 </tr>
1368 <tr>
1369 <td>relaxed restrictions on portable header names</td>
1370 <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n772.htm">N772</a></td>
1371 <td class="full" align="center">Yes</td>
1372 </tr>
1373 <tr>
1374 <td>return without an expression not permitted in function that returns a value</td>
1375 <td>Unknown</td>
1376 <td class="full" align="center">Yes</td>
1377 </tr>
1378 </table>
1379 </details>
1381 <h2 id="c89">C89 implementation status</h2>
1383 <p>Clang implements all of the ISO 9899:1990 (C89) standard.</p>
1384 <p>You can use Clang in C89 mode with the <code>-std=c89</code> or <code>-std=c90</code> options.</p>
1386 </div>
1387 </body>
1388 </html>