Skip to content

Commit 13629b1

Browse files
committed
[C2x] Support -std=c23 and -std=gnu23
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
1 parent 69a337e commit 13629b1

File tree

23 files changed

+98
-137
lines changed

23 files changed

+98
-137
lines changed

clang-tools-extra/clangd/index/StdLib.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ LangStandard::Kind standardFromOpts(const LangOptions &LO) {
6060
return LangStandard::lang_cxx98;
6161
}
6262
if (LO.C2x)
63-
return LangStandard::lang_c2x;
63+
return LangStandard::lang_c23;
6464
// C17 has no new features, so treat {C11,C17} as C17.
6565
if (LO.C11)
6666
return LangStandard::lang_c17;

clang/docs/ReleaseNotes.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,10 @@ C Language Changes
9898

9999
C2x Feature Support
100100
^^^^^^^^^^^^^^^^^^^
101+
- Clang now accepts ``-std=c23`` and ``-std=gnu23`` as language standard modes,
102+
and the ``__STDC_VERSION__`` macro now expands to ``202311L`` instead of its
103+
previous placeholder value. Clang continues to accept ``-std=c2x`` and
104+
``-std=gnu2x`` as aliases for C23 and GNU C23, respectively.
101105

102106
Non-comprehensive list of changes in this release
103107
-------------------------------------------------

clang/include/clang/Basic/LangStandards.def

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,13 +87,17 @@ LANGSTANDARD(gnu17, "gnu17",
8787
LineComment | C99 | C11 | C17 | Digraphs | GNUMode | HexFloat)
8888
LANGSTANDARD_ALIAS(gnu17, "gnu18")
8989

90-
// C2x modes
91-
LANGSTANDARD(c2x, "c2x",
92-
C, "Working Draft for ISO C2x",
90+
// C23 modes
91+
LANGSTANDARD(c23, "c23",
92+
C, "Working Draft for ISO C23",
9393
LineComment | C99 | C11 | C17 | C2x | Digraphs | HexFloat)
94-
LANGSTANDARD(gnu2x, "gnu2x",
95-
C, "Working Draft for ISO C2x with GNU extensions",
94+
LANGSTANDARD_ALIAS_DEPR(c23, "c2x")
95+
LANGSTANDARD(gnu23, "gnu23",
96+
C, "Working Draft for ISO C23 with GNU extensions",
9697
LineComment | C99 | C11 | C17 | C2x | Digraphs | GNUMode | HexFloat)
98+
LANGSTANDARD_ALIAS_DEPR(gnu23, "gnu2x")
99+
// FIXME: Add the alias for iso9899:202* once we know the year ISO publishes
100+
// the document (expected to be 2024).
97101

98102
// C++ modes
99103
LANGSTANDARD(cxx98, "c++98",

clang/lib/Frontend/InitPreprocessor.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -438,9 +438,8 @@ static void InitializeStandardPredefinedMacros(const TargetInfo &TI,
438438
// value is, are implementation-defined.
439439
// (Removed in C++20.)
440440
if (!LangOpts.CPlusPlus) {
441-
// FIXME: Use correct value for C23.
442441
if (LangOpts.C2x)
443-
Builder.defineMacro("__STDC_VERSION__", "202000L");
442+
Builder.defineMacro("__STDC_VERSION__", "202311L");
444443
else if (LangOpts.C17)
445444
Builder.defineMacro("__STDC_VERSION__", "201710L");
446445
else if (LangOpts.C11)

clang/lib/Headers/limits.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,7 @@
6767
#define CHAR_BIT __CHAR_BIT__
6868

6969
/* C2x 5.2.4.2.1 */
70-
/* FIXME: This is using the placeholder dates Clang produces for these macros
71-
in C2x mode; switch to the correct values once they've been published. */
72-
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202000L
70+
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L
7371
#define BOOL_WIDTH __BOOL_WIDTH__
7472
#define CHAR_WIDTH CHAR_BIT
7573
#define SCHAR_WIDTH CHAR_BIT

clang/lib/Headers/stdalign.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,8 @@
1010
#ifndef __STDALIGN_H
1111
#define __STDALIGN_H
1212

13-
/* FIXME: This is using the placeholder dates Clang produces for these macros
14-
in C2x mode; switch to the correct values once they've been published. */
1513
#if defined(__cplusplus) || \
16-
(defined(__STDC_VERSION__) && __STDC_VERSION__ < 202000L)
14+
(defined(__STDC_VERSION__) && __STDC_VERSION__ < 202311L)
1715
#ifndef __cplusplus
1816
#define alignas _Alignas
1917
#define alignof _Alignof

clang/lib/Headers/stdarg.h

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,11 @@ typedef __builtin_va_list va_list;
2323
#define _VA_LIST
2424
#endif
2525

26-
/* FIXME: This is using the placeholder dates Clang produces for these macros
27-
in C2x mode; switch to the correct values once they've been published. */
28-
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202000L
29-
/* C2x does not require the second parameter for va_start. */
26+
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L
27+
/* C23 does not require the second parameter for va_start. */
3028
#define va_start(ap, ...) __builtin_va_start(ap, 0)
3129
#else
32-
/* Versions before C2x do require the second parameter. */
30+
/* Versions before C23 do require the second parameter. */
3331
#define va_start(ap, param) __builtin_va_start(ap, param)
3432
#endif
3533
#define va_end(ap) __builtin_va_end(ap)

clang/lib/Headers/stdatomic.h

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,16 +45,14 @@ extern "C" {
4545
#define ATOMIC_POINTER_LOCK_FREE __CLANG_ATOMIC_POINTER_LOCK_FREE
4646

4747
/* 7.17.2 Initialization */
48-
/* FIXME: This is using the placeholder dates Clang produces for these macros
49-
in C2x mode; switch to the correct values once they've been published. */
50-
#if (defined(__STDC_VERSION__) && __STDC_VERSION__ < 202000L) || \
48+
#if (defined(__STDC_VERSION__) && __STDC_VERSION__ < 202311L) || \
5149
defined(__cplusplus)
52-
/* ATOMIC_VAR_INIT was removed in C2x, but still remains in C++23. */
50+
/* ATOMIC_VAR_INIT was removed in C23, but still remains in C++23. */
5351
#define ATOMIC_VAR_INIT(value) (value)
5452
#endif
5553

5654
#if ((defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201710L && \
57-
__STDC_VERSION__ < 202000L) || \
55+
__STDC_VERSION__ < 202311L) || \
5856
(defined(__cplusplus) && __cplusplus >= 202002L)) && \
5957
!defined(_CLANG_DISABLE_CRT_DEPRECATION_WARNINGS)
6058
/* ATOMIC_VAR_INIT was deprecated in C17 and C++20. */

clang/lib/Headers/stddef.h

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,14 +97,12 @@ using ::std::nullptr_t;
9797
#undef __need_NULL
9898
#endif /* defined(__need_NULL) */
9999

100-
/* FIXME: This is using the placeholder dates Clang produces for these macros
101-
in C2x mode; switch to the correct values once they've been published. */
102-
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202000L
100+
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L
103101
typedef typeof(nullptr) nullptr_t;
104-
#endif /* defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202000L */
102+
#endif /* defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L */
105103

106104
#if defined(__need_STDDEF_H_misc) && defined(__STDC_VERSION__) && \
107-
__STDC_VERSION__ >= 202000L
105+
__STDC_VERSION__ >= 202311L
108106
#define unreachable() __builtin_unreachable()
109107
#endif /* defined(__need_STDDEF_H_misc) && >= C23 */
110108

clang/lib/Headers/stdint.h

Lines changed: 16 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -499,9 +499,8 @@ typedef __UINTMAX_TYPE__ uintmax_t;
499499
# define INT64_MAX INT64_C( 9223372036854775807)
500500
# define INT64_MIN (-INT64_C( 9223372036854775807)-1)
501501
# define UINT64_MAX UINT64_C(18446744073709551615)
502-
/* FIXME: This is using the placeholder dates Clang produces for these macros
503-
in C2x mode; switch to the correct values once they've been published. */
504-
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202000L
502+
503+
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L
505504
# define UINT64_WIDTH 64
506505
# define INT64_WIDTH UINT64_WIDTH
507506

@@ -545,9 +544,7 @@ typedef __UINTMAX_TYPE__ uintmax_t;
545544
# define INT_FAST64_MAX __INT_LEAST64_MAX
546545
# define UINT_FAST64_MAX __UINT_LEAST64_MAX
547546

548-
/* FIXME: This is using the placeholder dates Clang produces for these macros
549-
in C2x mode; switch to the correct values once they've been published. */
550-
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202000L
547+
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L
551548
# define UINT_LEAST64_WIDTH __UINT_LEAST64_WIDTH
552549
# define INT_LEAST64_WIDTH UINT_LEAST64_WIDTH
553550
# define UINT_FAST64_WIDTH __UINT_LEAST64_WIDTH
@@ -586,9 +583,7 @@ typedef __UINTMAX_TYPE__ uintmax_t;
586583
# undef __UINT_LEAST8_MAX
587584
# define __UINT_LEAST8_MAX UINT56_MAX
588585

589-
/* FIXME: This is using the placeholder dates Clang produces for these macros
590-
in C2x mode; switch to the correct values once they've been published. */
591-
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202000L
586+
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L
592587
# define UINT56_WIDTH 56
593588
# define INT56_WIDTH UINT56_WIDTH
594589
# define UINT_LEAST56_WIDTH UINT56_WIDTH
@@ -635,9 +630,7 @@ typedef __UINTMAX_TYPE__ uintmax_t;
635630
# undef __UINT_LEAST8_MAX
636631
# define __UINT_LEAST8_MAX UINT48_MAX
637632

638-
/* FIXME: This is using the placeholder dates Clang produces for these macros
639-
in C2x mode; switch to the correct values once they've been published. */
640-
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202000L
633+
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L
641634
#define UINT48_WIDTH 48
642635
#define INT48_WIDTH UINT48_WIDTH
643636
#define UINT_LEAST48_WIDTH UINT48_WIDTH
@@ -684,9 +677,7 @@ typedef __UINTMAX_TYPE__ uintmax_t;
684677
# undef __UINT_LEAST8_MAX
685678
# define __UINT_LEAST8_MAX UINT40_MAX
686679

687-
/* FIXME: This is using the placeholder dates Clang produces for these macros
688-
in C2x mode; switch to the correct values once they've been published. */
689-
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202000L
680+
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L
690681
# define UINT40_WIDTH 40
691682
# define INT40_WIDTH UINT40_WIDTH
692683
# define UINT_LEAST40_WIDTH UINT40_WIDTH
@@ -727,9 +718,7 @@ typedef __UINTMAX_TYPE__ uintmax_t;
727718
# undef __UINT_LEAST8_MAX
728719
# define __UINT_LEAST8_MAX UINT32_MAX
729720

730-
/* FIXME: This is using the placeholder dates Clang produces for these macros
731-
in C2x mode; switch to the correct values once they've been published. */
732-
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202000L
721+
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L
733722
# define UINT32_WIDTH 32
734723
# define INT32_WIDTH UINT32_WIDTH
735724
# undef __UINT_LEAST32_WIDTH
@@ -749,9 +738,7 @@ typedef __UINTMAX_TYPE__ uintmax_t;
749738
# define INT_FAST32_MAX __INT_LEAST32_MAX
750739
# define UINT_FAST32_MAX __UINT_LEAST32_MAX
751740

752-
/* FIXME: This is using the placeholder dates Clang produces for these macros
753-
in C2x mode; switch to the correct values once they've been published. */
754-
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202000L
741+
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L
755742
# define UINT_LEAST32_WIDTH __UINT_LEAST32_WIDTH
756743
# define INT_LEAST32_WIDTH UINT_LEAST32_WIDTH
757744
# define UINT_FAST32_WIDTH __UINT_LEAST32_WIDTH
@@ -784,9 +771,7 @@ typedef __UINTMAX_TYPE__ uintmax_t;
784771
# undef __UINT_LEAST8_MAX
785772
# define __UINT_LEAST8_MAX UINT24_MAX
786773

787-
/* FIXME: This is using the placeholder dates Clang produces for these macros
788-
in C2x mode; switch to the correct values once they've been published. */
789-
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202000L
774+
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L
790775
# define UINT24_WIDTH 24
791776
# define INT24_WIDTH UINT24_WIDTH
792777
# define UINT_LEAST24_WIDTH UINT24_WIDTH
@@ -819,9 +804,7 @@ typedef __UINTMAX_TYPE__ uintmax_t;
819804
# undef __UINT_LEAST8_MAX
820805
# define __UINT_LEAST8_MAX UINT16_MAX
821806

822-
/* FIXME: This is using the placeholder dates Clang produces for these macros
823-
in C2x mode; switch to the correct values once they've been published. */
824-
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202000L
807+
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L
825808
# define UINT16_WIDTH 16
826809
# define INT16_WIDTH UINT16_WIDTH
827810
# undef __UINT_LEAST16_WIDTH
@@ -839,9 +822,7 @@ typedef __UINTMAX_TYPE__ uintmax_t;
839822
# define INT_FAST16_MAX __INT_LEAST16_MAX
840823
# define UINT_FAST16_MAX __UINT_LEAST16_MAX
841824

842-
/* FIXME: This is using the placeholder dates Clang produces for these macros
843-
in C2x mode; switch to the correct values once they've been published. */
844-
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202000L
825+
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L
845826
# define UINT_LEAST16_WIDTH __UINT_LEAST16_WIDTH
846827
# define INT_LEAST16_WIDTH UINT_LEAST16_WIDTH
847828
# define UINT_FAST16_WIDTH __UINT_LEAST16_WIDTH
@@ -862,9 +843,7 @@ typedef __UINTMAX_TYPE__ uintmax_t;
862843
# undef __UINT_LEAST8_MAX
863844
# define __UINT_LEAST8_MAX UINT8_MAX
864845

865-
/* FIXME: This is using the placeholder dates Clang produces for these macros
866-
in C2x mode; switch to the correct values once they've been published. */
867-
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202000L
846+
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L
868847
# define UINT8_WIDTH 8
869848
# define INT8_WIDTH UINT8_WIDTH
870849
# undef __UINT_LEAST8_WIDTH
@@ -880,9 +859,7 @@ typedef __UINTMAX_TYPE__ uintmax_t;
880859
# define INT_FAST8_MAX __INT_LEAST8_MAX
881860
# define UINT_FAST8_MAX __UINT_LEAST8_MAX
882861

883-
/* FIXME: This is using the placeholder dates Clang produces for these macros
884-
in C2x mode; switch to the correct values once they've been published. */
885-
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202000L
862+
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L
886863
# define UINT_LEAST8_WIDTH __UINT_LEAST8_WIDTH
887864
# define INT_LEAST8_WIDTH UINT_LEAST8_WIDTH
888865
# define UINT_FAST8_WIDTH __UINT_LEAST8_WIDTH
@@ -908,9 +885,7 @@ typedef __UINTMAX_TYPE__ uintmax_t;
908885
#define SIZE_MAX __SIZE_MAX__
909886

910887
/* C2x 7.20.2.4 Width of integer types capable of holding object pointers. */
911-
/* FIXME: This is using the placeholder dates Clang produces for these macros
912-
in C2x mode; switch to the correct values once they've been published. */
913-
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202000L
888+
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L
914889
/* NB: The C standard requires that these be the same value, but the compiler
915890
exposes separate internal width macros. */
916891
#define INTPTR_WIDTH __INTPTR_WIDTH__
@@ -929,9 +904,7 @@ typedef __UINTMAX_TYPE__ uintmax_t;
929904
#define UINTMAX_MAX __UINTMAX_MAX__
930905

931906
/* C2x 7.20.2.5 Width of greatest-width integer types. */
932-
/* FIXME: This is using the placeholder dates Clang produces for these macros
933-
in C2x mode; switch to the correct values once they've been published. */
934-
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202000L
907+
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L
935908
/* NB: The C standard requires that these be the same value, but the compiler
936909
exposes separate internal width macros. */
937910
#define INTMAX_WIDTH __INTMAX_WIDTH__
@@ -965,9 +938,7 @@ typedef __UINTMAX_TYPE__ uintmax_t;
965938
#define UINTMAX_C(v) __int_c(v, __UINTMAX_C_SUFFIX__)
966939

967940
/* C2x 7.20.3.x Width of other integer types. */
968-
/* FIXME: This is using the placeholder dates Clang produces for these macros
969-
in C2x mode; switch to the correct values once they've been published. */
970-
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202000L
941+
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L
971942
#define PTRDIFF_WIDTH __PTRDIFF_WIDTH__
972943
#define SIG_ATOMIC_WIDTH __SIG_ATOMIC_WIDTH__
973944
#define SIZE_WIDTH __SIZE_WIDTH__

clang/test/C/C11/n1330.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,7 @@ void test(void) {
5858
_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}}
5959
}
6060

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
6462
// The use of a _Static_assert in a K&R C function definition is prohibited per
6563
// 6.9.1p6 requiring each declaration to have a declarator (which a static
6664
// assertion does not have) and only declare identifiers from the identifier

clang/test/C/drs/dr0xx.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ void dr031(int i) {
234234
*/
235235
int dr032 = (1, 2); /* expected-warning {{left operand of comma operator has no effect}} */
236236

237-
#if __STDC_VERSION__ < 202000L
237+
#if __STDC_VERSION__ < 202311L
238238
/* WG14 DR035: partial
239239
* Questions about definition of functions without a prototype
240240
*/
@@ -251,7 +251,7 @@ void dr035_2(c) /* expected-warning {{a function definition without a prototype
251251
*/
252252
int test = q; /* expected-error {{use of undeclared identifier 'q'}} */
253253
}
254-
#endif /* __STDC_VERSION__ < 202000L */
254+
#endif /* __STDC_VERSION__ < 202311L */
255255

256256
/* WG14 DR038: yes
257257
* Questions about argument substitution during macro expansion
@@ -339,7 +339,7 @@ void dr050(void) {
339339
(void)NULL; /* expected-error {{use of undeclared identifier 'NULL'}} */
340340
}
341341

342-
#if __STDC_VERSION__ < 202000L
342+
#if __STDC_VERSION__ < 202311L
343343
/* WG14 DR053: yes
344344
* Accessing a pointer to a function with a prototype through a pointer to
345345
* pointer to function without a prototype
@@ -356,7 +356,7 @@ void dr053(void) {
356356
fpp = &fp1;
357357
(**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}} */
358358
}
359-
#endif /* __STDC_VERSION__ < 202000L */
359+
#endif /* __STDC_VERSION__ < 202311L */
360360

361361
/* WG14 DR064: yes
362362
* Null pointer constants
@@ -385,7 +385,7 @@ void dr068(void) {
385385
#endif
386386
}
387387

388-
#if __STDC_VERSION__ < 202000L
388+
#if __STDC_VERSION__ < 202311L
389389
/* WG14: DR070: yes
390390
* Interchangeability of function arguments
391391
*
@@ -406,7 +406,7 @@ void dr070_2(void) {
406406
dr070_1(6);
407407
dr070_1(6U); /* Pedantically UB */
408408
}
409-
#endif /* __STDC_VERSION__ < 202000L */
409+
#endif /* __STDC_VERSION__ < 202311L */
410410

411411
/* WG14 DR071: yes
412412
* Enumerated types

clang/test/C/drs/dr2xx.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ void dr251(void) {
231231
struct dr251_fred *ptr; /* expected-error {{use of 'dr251_fred' with tag type that does not match previous declaration}} */
232232
}
233233

234-
#if __STDC_VERSION__ < 202000L
234+
#if __STDC_VERSION__ < 202311L
235235
/* WG14 DR252: yes
236236
* Incomplete argument types when calling non-prototyped functions
237237
*/
@@ -250,7 +250,7 @@ void dr252(void) {
250250
expected-warning {{passing arguments to 'dr252_no_proto' without a prototype is deprecated in all versions of C and is not supported in C2x}}
251251
*/
252252
}
253-
#endif /* __STDC_VERSION__ < 202000L */
253+
#endif /* __STDC_VERSION__ < 202311L */
254254

255255
/* WG14 DR258: yes
256256
* Ordering of "defined" and macro replacement

0 commit comments

Comments
 (0)