C2Y (C standard revision)

Last updated

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]

Contents

Features

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

Operators

Statements

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

Keywords

Compiler support

The following compilers implement an experimental compiler flag to support C2Y:

History

January 2024

The following changes were made after the January 2024 WG14 meeting: [6] [1]

June 2024

The following changes were made after the June 2024 WG14 meeting: [6] [1]

September 2024

The following changes were made after the September/October 2024 WG14 meeting: [6] [1]

February 2025

The following changes were made after the February 2025 WG14 meeting: [6] [1]

See also

References

  1. 1 2 3 4 5 6 7 "WG14 Document Repository". open-std.org. Archived from the original on September 30, 2025.
  2. "WG14-N3583: Draft Minutes for 24–28 February, 2025". open-std.org. February 28, 2025. Archived from the original on September 20, 2025.
  3. 1 2 "GCC 15 Release Series". GNU.org. Archived from the original on October 27, 2025.
  4. 1 2 "LLVM Clang 19 Adds Initial "-std=c2y" Support For The Next C Standard". Phoronix.com. July 2, 2024. Archived from the original on October 27, 2025.
  5. 1 2 "C Support in Clang - C2Y implementation status". LLVM.org. Archived from the original on October 27, 2025.
  6. 1 2 3 4 5 6 "WG14-N3550: Working Draft for ISO/IEC 9899:202Y" (PDF). open-std.org. May 4, 2025. Archived (PDF) from the original on October 11, 2025.
  7. 1 2 3 4 "WG14-N3353: Obsolete implicitly octal literals and add delimited escape sequences". open-std.org. October 18, 2024. Archived from the original on October 3, 2025.
  8. "WG14-N2630: Formatted input/output of binary integer numbers (rev3) (for C23)" (PDF). open-std.org. January 1, 2021. Archived (PDF) from the original on December 14, 2022.
  9. "WG21-p2290r3: Delimited escape sequences (for C++23)" (PDF). open-std.org. February 25, 2022. Archived (PDF) from the original on October 11, 2025.
  10. "WG14-N3369: New _Lengthof() operator (v4)" (PDF). open-std.org. October 1, 2021. Archived (PDF) from the original on August 31, 2025.
  11. "WG14-N3469: The Big Array Size Survey". open-std.org. February 3, 2025. Archived from the original on October 7, 2025.
  12. "WG14-N3356: 'if' declarations, v3". open-std.org. September 18, 2024. Archived from the original on August 4, 2025.
  13. 1 2 3 4 5 6 "WG14-N3367: More Modern Bit Utilities". open-std.org. September 4, 2024. Archived from the original on October 3, 2025.
  14. "WG14-N3022: Modern Bit Utilities (for C23)". open-std.org. July 6, 2022. Archived from the original on December 24, 2022.
  15. "WG14-N3274: Remove imaginary types" (PDF). open-std.org. June 14, 2024. Archived (PDF) from the original on August 24, 2025.

Further reading

Preceded by
C23
C language standards Latest