GCC 14 Now Honors The -std=c23 & -std=gnu23 Compiler Options For C23

Written by Michael Larabel in GNU on 6 November 2023 at 12:56 PM EST. 5 Comments
GNU
While the next revision of the C standard won't see its formal publishing until the 2024 calendar year, the ISO C standards committee already decided on keeping "C23" as the informal name for this next major C update. As such, with today's GCC 14 Git the -std=c23 compiler option for targeting C23 is now honored along with -std=gnu23 for the GNU dialect of C23.

The GNU Compiler Collection has long been working on the new features of C23 and it's been available to date using the "-std=c2x" target. Now the -std=c2x is a deprecated alias with -std=c23 being added now to GCC. The GCC 14 support for C23 isn't fully complete and still considered experimental but overall in good enough shape and now that it's been determined C23 will in fact be the informal name and not C24, they are comfortable in making the change for GCC 14.

GCC C23


This commit added -std=c23 along with -std=gnu23 and -Wc11-c23-compat options. GCC 14 feature development is ending this month while the stable GCC 14.1 release won't be out until the early months of 2024.

C23 has been in development for several years with a number of new standard library functions, #elifdef and #elifndef preprocessor directives are now mandated similar to C++23, true and false keywords, standardization of the typeof() operator, zero initialization with {}, unnamed parameters in function definitions, C++ compatibility improvements, the constexpr and nullptr keywords, and bit-precise integer types, among other additions.

LLVM Clang meanwhile added -std=c23 back in August.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week