C2Y is an informal name for the next revision of the C programming language after C23 that is hoped to be released in the 2020s, hence the '2' in "C2Y". An early working draft of C2Y was released in February 2024 as N3220.[1] The first "Working Group 14" (WG14) meeting primarily about the C2Y draft was held in February 2025.[2] Changes have already started to be integrated in popular C/C++compilers: GCC 15 and Clang 19.[3][4][5]
The following are changes integrated into the latest working draft of C2Y.[6][1] Keep in mind that the following changes are still is the draft stage, thus anything may change before the final ratification.
Note: This section is not complete. Changes listed in the History section will be incrementally migrated into this section over time.
Constants
Add 0o and 0Ooctalliteral constant prefixes; such as 0o137 and 0O247.[7] This change is similar to 0b and 0B binary literal constant prefixes that were previously added in the C23 standard.[8]
Add {} delimited escape sequences for C strings: \o{} for octal (arbitrary number of octal digits), \x{} for hexadecimal (arbitrary number of hex digits), \u{} for universal character name (sequence of hex digits that represents a valid Unicode character); such as "\o{110}\x{65}llo" which creates a string identical to "Hello" (in ASCII), and "\u{2021}" which is the Unicode value of a double dagger "‡" character.[7] This change was previously added in the C++23 standard.[9] The \u{} is a valid syntax in Rust and JavaScript computer languages too.
Operators
Add _Countof keyword & operator, and countof() macro in <stdcountof.h> to determine the number of elements of an array, such as long baudrate[22]; ns = countof(baudrate); means ns is 22.[10][11]
Statements
For the if statement, add support for variable declaration, such as if (int err = xmit_ch(ch)) log_err(err);, similar to how the for change was added in the C99 standard. The new variable can be used inside the scope of all branches of if, else, else if too. In C++, variable declaration has been allowed since the C++98 standard, further enhanced in the C++17 standard to allow for a second clause so the variable could be used within the condition itself, and C will use the later for C++ compatibility.[12]
Standard Library
Existing functions
For functions strtol(), strtoll(), strtoul(), strtoull(), and their wide counterparts wcstol(), wcstoll(), wcstoul(), wcstoull(), if the value of base is 8 (octal), the characters 0o or 0O may optionally precede the sequence of digits. If a sign is present, the 0o or 0O follows the sign.[7]
New functions
Add bit utility functions / macros / types in header <stdbit.h> to examine many integer types. All start with stdc_ to minimize conflict with legacy code and 3rd party libraries.[13] More bit utility functions were previously added in the C23 standard.[14]
Add stdc_memreverse8() (8-bit) and stdc_memreverse8uN() (exact-width 8-bit) to reverse memory, such as 0xAABBCCDDu reversed into 0xDDCCBBAAu. For function name suffix: "u" means unsigned, "N" means a multiple of 8, such as 8, 16, 32, ...[13]
Add stdc_rotate_left_uc(), stdc_rotate_left_us(), stdc_rotate_left_ui(), stdc_rotate_left_ul(), stdc_rotate_left_ull(), and generic stdc_rotate_left() to rotate bits left.[13]
Add stdc_rotate_right_uc(), stdc_rotate_right_us(), stdc_rotate_right_ui(), stdc_rotate_right_ul(), stdc_rotate_right_ull(), and generic stdc_rotate_right() to rotate bits right.[13]
Add stdc_load8_leuN(), stdc_load8_beuN(), stdc_load8_aligned_leuN(), stdc_load8_aligned_beuN(), and stdc_load8_lesN(), stdc_load8_besN(), stdc_load8_aligned_lesN(), stdc_load8_aligned_besN() to perform endian-aware 8-bit loads. For function name suffix: "b" means big endian, "l" means little endian, "u" means unsigned, "s" means signed, "N" means a multiple of 8 such as 8, 16, 32, ...[13]
Add stdc_store8_leuN(), stdc_store8_beuN(), stdc_store8_aligned_leuN(), stdc_store8_aligned_beuN(), and stdc_store8_lesN(), stdc_store8_besN(), stdc_store8_aligned_lesN(), stdc_store8_aligned_besN() to perform endian-aware 8-bit stores. For function name suffix: "b" means big endian, "l" means little endian, "u" means unsigned, "s" means signed, "N" means a multiple of 8 such as 8, 16, 32, ...[13]
Obsolete features
Obsolete C programming language features removed or deprecated in the working draft of C2Y:[6][1]
Constants
For octal literals, such as 057, the leading zero will be retained but marked as obsolescent to avoid breaking existing code. Compilers should output a warning that will hopefully encourage rewrites. As of N3353, there will be no changes to printf(), but WG14 would like to see a future paper that propose changes.[7]
This page is based on this Wikipedia article Text is available under the CC BY-SA 4.0 license; additional terms may apply. Images, videos and audio are available under their respective licenses.