You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
C2x was finalized at the June 2023 WG14 meeting. The DIS is out for
balloting and the comment period for that closes later this year/early
next year. While that does leave an opportunity for more changes to the
standard during the DIS ballot resolution process, only editorial
changes are anticipated and as a result, the C committee considers C2x
to be final. The committee took a straw poll on what we'd prefer the
informal name of the standard be, and we decided it should be called
C23 regardless of what year ISO publishes it.
However, because the final publication is not out, this patch does not
add the language standard alias for the -std=iso9899:<year> spelling of
the standard mode; that will be added once ISO finally publishes the
document and the year chosen will match the publication date.
This also changes the value of __STDC_VERSION__ from the placeholder
value 202000L to the final value 202311L.
Subsequent patches will start renaming things from c2x to c23, cleaning
up documentation, etc.
Differential Revision: https://reviews.llvm.org/D157606
Copy file name to clipboardExpand all lines: clang/test/C/C11/n1330.c
+1-3Lines changed: 1 addition & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -58,9 +58,7 @@ void test(void) {
58
58
_Static_assert(1.0f, "this should not compile"); // expected-warning {{expression is not an integer constant expression; folding it to a constant is a GNU extension}}
59
59
}
60
60
61
-
// FIXME: This is using the placeholder date Clang produces for the macro in
62
-
// C2x mode; switch to the correct value once it's been published.
63
-
#if__STDC_VERSION__<202000L
61
+
#if__STDC_VERSION__<202311L
64
62
// The use of a _Static_assert in a K&R C function definition is prohibited per
65
63
// 6.9.1p6 requiring each declaration to have a declarator (which a static
66
64
// assertion does not have) and only declare identifiers from the identifier
Copy file name to clipboardExpand all lines: clang/test/C/drs/dr0xx.c
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -234,7 +234,7 @@ void dr031(int i) {
234
234
*/
235
235
intdr032= (1, 2); /* expected-warning {{left operand of comma operator has no effect}} */
236
236
237
-
#if__STDC_VERSION__<202000L
237
+
#if__STDC_VERSION__<202311L
238
238
/* WG14 DR035: partial
239
239
* Questions about definition of functions without a prototype
240
240
*/
@@ -251,7 +251,7 @@ void dr035_2(c) /* expected-warning {{a function definition without a prototype
251
251
*/
252
252
inttest=q; /* expected-error {{use of undeclared identifier 'q'}} */
253
253
}
254
-
#endif/* __STDC_VERSION__ < 202000L */
254
+
#endif/* __STDC_VERSION__ < 202311L */
255
255
256
256
/* WG14 DR038: yes
257
257
* Questions about argument substitution during macro expansion
@@ -339,7 +339,7 @@ void dr050(void) {
339
339
(void)NULL; /* expected-error {{use of undeclared identifier 'NULL'}} */
340
340
}
341
341
342
-
#if__STDC_VERSION__<202000L
342
+
#if__STDC_VERSION__<202311L
343
343
/* WG14 DR053: yes
344
344
* Accessing a pointer to a function with a prototype through a pointer to
345
345
* pointer to function without a prototype
@@ -356,7 +356,7 @@ void dr053(void) {
356
356
fpp=&fp1;
357
357
(**fpp)(3); /* expected-warning {{passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x}} */
0 commit comments