File tree Expand file tree Collapse file tree 3 files changed +16
-7
lines changed Expand file tree Collapse file tree 3 files changed +16
-7
lines changed Original file line number Diff line number Diff line change 69
69
70
70
# # Ditto for a compiler that supports C23 features.
71
71
# # For example 'CC23=clang-15 -std=gnu2x'
72
- # # Eventually -std=gnu23 will be supported and preferred.
72
+ # # -std=gnu2x is supported by at least GCC >= 12, LLVM clang >= 15 and Apple clang >= 16
73
+ # # Eventually -std=gnu23 will be supported and preferred
74
+ # # (and is by GCC >= 14 and LLVM >= 18).
73
75
# # Default to CC and CFLAGS with any -std options removed, then
74
76
# # -std=gmu2x appended to CC.
75
77
# # CC23=
Original file line number Diff line number Diff line change @@ -3196,12 +3196,15 @@ clarifying the formerly deprecated meaning of function declarations with
3196
3196
an empty parameter list to mean zero parameters. (There are many other
3197
3197
additions: see for example @uref{https://en.cppreference.com/w/c/23}.)
3198
3198
3199
+ @c GCC 14, LLVM clang 19 and Apple clang 16 default to C17
3200
+ @c In 2025-01 GCC pre=15 defaulted to C23 (but did not document so).
3199
3201
The @command{configure} script in recent versions of @R{} aims to choose
3200
3202
a C compiler which supports C11: as the default in recent versions of
3201
3203
@command{gcc}, @I{LLVM} @command{clang} and Apple @command{clang} is C17,
3202
3204
that is what is likely to be chosen. On the other hand, until @R{} 4.3.0
3203
3205
the makefiles for the Windows build specified C99. They now use the
3204
- compiler default which for the recommended compiler is C17.
3206
+ compiler default which for the recommended compiler is C17. Future
3207
+ versions (including @command{gcc}@tie{}15) are likely to default to C23.
3205
3208
3206
3209
Packages may want to either avoid or embrace the changes in C23, and can
3207
3210
do so @emph{via} specifying @samp{USE_Cnn} for 17, 23, 90 or 99 in the
Original file line number Diff line number Diff line change 39
39
extern "C" {
40
40
#endif
41
41
42
- /* C23 has a [[noreturn]] attribute supported in GCC 13 and LLVM clang
43
- * 15 with -std=c2x but not Apple clang 14. All have version 202000L.
44
- * clang 19 has version 202301L
45
- * gcc pre-15 supports -std=gnu23 with version 202301L but does not
46
- * support (and barfs on) this attribute, so restrict to clang for now.
42
+ /* C23 has a [[noreturn]] attribute supported in LLVM clang 15 with
43
+ * -std=c2x but not Apple clang 14. That and GCC verisions 12-14 have
44
+ * version 202000L.
45
+ * clang 19 has version 202301L (and supports -std=gnu23).
46
+ * gcc pre-15 supports -std=gnu23 with version 202301L but barfs on
47
+ * this attribute, so restrict to clang for now.
48
+ *
49
+ * https://en.cppreference.com/w/c/compiler_support/23
50
+ * claims GCC 13 and LLVM clang 15 support [[noreturn]] ....
47
51
*
48
52
* In C11 there is _Noreturn * (or noreturn in header <stdnoreturn.h>).
49
53
*/
You can’t perform that action at this time.
0 commit comments