@@ -1070,17 +1070,25 @@ suffice.
10701070@node C standards
10711071@subsection C standards
10721072
1073+ Comiling @R {} requires some POSIX features (such as
1074+ @code {strdup }@footnote {this is part of C23 , but part of the C library
1075+ not the compiler. } and the @code {ssize_t } type) not in the C
1076+ standards. Typically compilers make these available, but @strong {not } if
1077+ strict C compliance is specified by for example @option {-std=c17 }. So
1078+ if you want to specify a non-default standard use something like
1079+ @option {-std=gnu23 }.
1080+
10731081Compiling @R {} requires C99 or later: C11 and C17 are minor updates, but
1074- the substantial update planned for `C23' (finally published in October
1075- 2024) will also be supported .
1082+ the substantial update `C23' (finally published in October 2024) is also
1083+ supported for current versions of GCC and @command { clang } .
10761084
10771085As from @R {} 4.3.0 there is support for packages to indicate their
10781086preferred C version. Macros @code {CC17 }, @code {C17FLAGS }, @code {CC23 }
10791087and @code {C23FLAGS } can be set in @file {config.site } (there are examples
10801088there). Those for C17 should support C17 or earlier and not allow C23
10811089additions so for example @code {bool }, @code {true } and @code {false } can
1082- be used as identifiers. Those for C23 should support new types such as
1083- @code {bool }.
1090+ be used as identifiers. Those for C23 should support the new types such
1091+ as @code {bool }.
10841092
10851093Some compilers warn enthusiastically about prototypes. For most,
10861094omitting @option {-Wstrict-prototypes } in @code {C17FLAGS } suffices.
0 commit comments