C23 (C standard revision) explained

C23 is the informal name for ISO/IEC 9899:2024, the next standard for the C programming language, which will replace C17 (standard ISO/IEC 9899:2018).[1] It was started in 2016 informally as C2x,[2] and is expected to be published in 2024.[3] The most recent publicly available working draft of C23 was released on April 1, 2023. The first WG14 meeting for the C2x draft was held in October 2019,[4] virtual remote meetings were held in 2020 due to the COVID-19 pandemic, then various teleconference meetings continued to occur through 2024.

Features

Changes integrated into the latest working draft of C23 are listed below.[5]

Standard Library

New functions

\pix

and exp10.[12]

Existing functions

Preprocessor

Types

Constants

Keywords

Syntax

C++ compatibility

Other features

Obsolete features

Some old obsolete features are either removed or deprecated from the working draft of C23:

Compiler support

The GCC 9,[67] Clang 9.0,[68] and Pelles C 11.00[69] compilers implement an experimental compiler flag to support this standard.

See also

Further reading

External links

Notes and References

  1. Web site: History of C . cppreference.com . https://web.archive.org/web/20221019191546/https://en.cppreference.com/w/c/language/history . October 19, 2022 . 2022-06-27 . live.
  2. Web site: WG14-N2086: C2x Charter . open-std.org . https://web.archive.org/web/20221222213708/https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2086.htm . December 22, 2022 . 2016-09-20 . live.
  3. Web site: WG14-N3156: Updated C23 Schedule . open-std.org . https://web.archive.org/web/20240129010357/https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3156.pdf . January 29, 2024 . 2023-07-19 . live.
  4. Web site: WG14-N2437: Agenda for October 2019 . open-std.org . https://web.archive.org/web/20210305073426/https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2437.htm . March 5, 2021 . 2019-10-21 . live.
  5. Web site: WG14-N3096: Draft for ISO/IEC 9899:2024 . open-std.org . https://web.archive.org/web/20230402172459/https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3096.pdf . April 2, 2023 . April 1, 2023 . live.
  6. Web site: WG14-N2897: memset_explicit . open-std.org . https://web.archive.org/web/20221025074215/https://open-std.org/jtc1/sc22/wg14/www/docs/n2897.htm . October 25, 2022 . 2021-12-27 . live.
  7. Web site: WG14-N2349: Toward more efficient string copying and concatenation . open-std.org . https://web.archive.org/web/20220930092258/https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2349.htm . September 30, 2022 . 2019-03-18 . live.
  8. Web site: WG14-N2353: strdup and strndup . open-std.org . https://web.archive.org/web/20221224063709/https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2353.htm . December 24, 2022 . 2019-03-18 . live.
  9. Web site: WG14-N2974: Queryable pointer alignment . open-std.org . https://web.archive.org/web/20221013182240/https://www.open-std.org/jtc1/sc22/WG14/www/docs/n2974.pdf . October 13, 2022 . 2022-04-15 . live.
  10. Web site: WG14-N3022: Modern Bit Utilities . open-std.org . https://web.archive.org/web/20221224194734/https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3022.htm . December 24, 2022 . 2022-07-06 . live.
  11. Web site: WG14-N2833: Add timegm as non-optional part of time.h . open-std.org . https://web.archive.org/web/20211201062452/https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2833.htm . December 1, 2021 . 2021-10-07 . live.
  12. See N3096 § B.11 for a useful overview. The functions were added in separate documents: N2488, its updated versions, and its refs.
  13. Web site: WG14-N2630: formatted input/output of binary integer numbers . open-std.org . https://web.archive.org/web/20221214154315/https://open-std.org/JTC1/SC22/WG14/www/docs/n2630.pdf . December 14, 2022 . 2021-01-01 . live.
  14. Web site: WG14-N3020: Qualifier-preserving standard library functions . open-std.org . https://web.archive.org/web/20221013190826/https://www.open-std.org/jtc1/sc22/WG14/www/docs/n3020.pdf . October 13, 2022 . 2022-06-13 . live.
  15. Web site: WG14-N2645: Add support for preprocessing directives #elifdef and #elifndef . open-std.org . https://web.archive.org/web/20221128133337/https://open-std.org/JTC1/SC22/WG14/www/docs/n2645.pdf . November 28, 2022 . 2020-01-25 . live.
  16. Web site: GCC 12 Adds Support For New #elifdef #elifndef Directives . phoronix . https://web.archive.org/web/20221227050002/https://www.phoronix.com/news/GCC-12-elifdef-elifndef . December 27, 2022 . May 12, 2021 . live.
  17. Web site: WG14-N3017: #embed - a scannable, tooling-friendly binary resource inclusion mechanism . open-std.org . https://web.archive.org/web/20221224045304/https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3017.htm . December 24, 2022 . 2022-06-27 . live.
  18. Web site: WG14-N2686: #warning . open-std.org . https://web.archive.org/web/20221128133337/https://open-std.org/JTC1/SC22/WG14/www/docs/n2686.pdf . November 28, 2022 . 2022-07-22 . live.
  19. Web site: WG14-N2799: __has_include for C . open-std.org . https://web.archive.org/web/20221224103617/https://open-std.org/JTC1/SC22/WG14/www/docs/n2799.pdf . December 24, 2022 . 2021-08-30 . live.
  20. Web site: WG14-N2553: Querying attribute support . open-std.org . https://web.archive.org/web/20221014221314/https://open-std.org/JTC1/SC22/WG14/www/docs/n2553.pdf . October 14, 2022 . 2020-08-04 . live.
  21. Web site: WG14-N3033: Comma omission and comma deletion . open-std.org . https://web.archive.org/web/20221227031727/https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3033.htm . December 27, 2022 . 2022-07-20 . live.
  22. Web site: WG14-N2763: Adding a Fundamental Type for N-bit integers . open-std.org . https://web.archive.org/web/20221227055250/https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2763.pdf . December 27, 2022 . 2021-06-21 . live.
  23. Web site: WG14-N3035: _BitInt Fixes . open-std.org . https://web.archive.org/web/20221013182206/https://www.open-std.org/jtc1/sc22/WG14/www/docs/n3035.pdf . October 13, 2022 . 2022-07-21 . live.
  24. Web site: WG14-N2867: Checked N-Bit Integers . open-std.org . https://web.archive.org/web/20221214154907/https://open-std.org/JTC1/SC22/WG14/www/docs/n2867.pdf . December 14, 2022 . 2021-11-28 . live.
  25. Web site: WG14-N2778: Variably-Modified Types . open-std.org . https://web.archive.org/web/20221222053411/https://open-std.org/jtc1/sc22/wg14/www/docs/n2778.pdf . December 22, 2022 . 2021-07-11 . live.
  26. Web site: WG14-N2607: Compatibility of Pointers to Arrays with Qualifiers . open-std.org . https://web.archive.org/web/20221013182946/https://www.open-std.org/jtc1/sc22/WG14/www/docs/n2607.pdf . October 13, 2022 . 2020-10-31 . live.
  27. Web site: WG14-N2899: Not-so-magic - typeof for C . open-std.org . https://web.archive.org/web/20221224044528/https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2899.htm . December 24, 2022 . 2022-01-21 . live.
  28. Web site: WG14-N3007: Type inference for object definitions . open-std.org . https://web.archive.org/web/20221224105654/https://open-std.org/JTC1/SC22/WG14/www/docs/n3007.htm . December 24, 2022 . 2022-06-10 . live.
  29. Web site: WG14-N3037: Improved Rules for Tag Compatibility (updates N3032) .
  30. Web site: C23 is Finished: Here is What is on the Menu . The Pasture . en . 31 July 2022.
  31. Web site: WR14-N3042: Introduce the nullptr constant . open-std.org . https://web.archive.org/web/20221224043228/https://open-std.org/JTC1/SC22/WG14/www/docs/n3042.htm . December 24, 2022 . 2022-07-22 . live.
  32. Web site: WG14-N2775: Literal suffixes for bit-precise integers . open-std.org . https://web.archive.org/web/20221227014728/https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2775.pdf . December 27, 2022 . 2021-07-13 . live.
  33. Web site: WG14-N2549: Allow for binary integer constants . open-std.org . https://web.archive.org/web/20221222192818/https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2549.pdf . December 22, 2022 . 2020-07-30 . live.
  34. Web site: WG14-N2626: Digit separators . open-std.org . https://web.archive.org/web/20221219215425/https://open-std.org/JTC1/SC22/WG14/www/docs/n2626.pdf . December 19, 2022 . 2020-12-15 . live.
  35. Web site: WG14-N3030: Enhancements to Enumerations . open-std.org . https://web.archive.org/web/20221126132709/https://open-std.org/JTC1/SC22/WG14/www/docs/n3030.htm . November 26, 2022 . 2022-07-19 . live.
  36. Web site: WG14-N3029: Improved Normal Enumerations . open-std.org . https://web.archive.org/web/20230129180341/https://open-std.org/JTC1/SC22/WG14/www/docs/n3029.htm . January 29, 2023 . 2022-07-19 . live.
  37. Web site: WG14-N2935: Make false and true first-class language features . open-std.org . https://web.archive.org/web/20221121123457/https://open-std.org/JTC1/SC22/WG14/www/docs/n2935.pdf . November 21, 2022 . 2022-02-15 . live.
  38. Web site: WG14-N2934: Revise spelling of keywords . open-std.org . https://web.archive.org/web/20221224132455/https://open-std.org/JTC1/SC22/WG14/www/docs/n2934.pdf . December 24, 2022 . 2022-02-15 . live.
  39. Web site: WG14-N2508: Free Positioning of Labels Inside Compound Statements . open-std.org . https://web.archive.org/web/20221227183107/https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2508.pdf . December 27, 2022 . 2020-03-28 . live.
  40. Web site: WG14-N2510: Allowing unnamed parameters in a function definition . open-std.org . https://web.archive.org/web/20221224075948/https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2510.pdf . December 24, 2022 . 2020-04-09 . live.
  41. Web site: WG14-N2900: Consistent, Warningless, and Intuitive Initialization with . open-std.org . https://web.archive.org/web/20221227181452/https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2900.htm . December 27, 2022 . 2022-01-01 . live.
  42. Web site: WG14-N2975: Relax requirements for variadic parameter lists . open-std.org . https://web.archive.org/web/20221128133337/https://open-std.org/JTC1/SC22/WG14/www/docs/n2975.pdf . November 28, 2022 . 2022-04-15 . live.
  43. Web site: WG14-N2335: Attributes in C . open-std.org . https://web.archive.org/web/20221026060722/https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2335.pdf . October 26, 2022 . 2019-03-09 . live.
  44. Web site: Unsequenced functions . 2024-07-18 . open-std.org.
  45. Web site: WG14-N2265: Harmonizing static_assert with C++ . open-std.org . https://web.archive.org/web/20230328064918/https://open-std.org/JTC1/SC22/WG14/www/docs/n2265.pdf . March 28, 2023 . 2018-07-06 . live.
  46. Web site: Labels at the end of compound statements (C compatibility). 2022-01-13.
  47. Web site: WG14-N2554: Minor attribute wording cleanups . open-std.org . https://web.archive.org/web/20221128133337/https://open-std.org/JTC1/SC22/WG14/www/docs/n2554.pdf . November 28, 2022 . 2020-08-04 . live.
  48. Web site: WG14-N2334: The deprecated attribute . open-std.org . https://web.archive.org/web/20221019131835/https://open-std.org/JTC1/SC22/WG14/www/docs/n2334.pdf . October 19, 2022 . 2019-01-22 . live.
  49. Web site: WG14-N2408: The fallthrough attribute . open-std.org . https://web.archive.org/web/20221225070709/https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2408.pdf . December 25, 2022 . 2019-08-11 . live.
  50. Web site: WG14-N2270: The maybe_unused attribute . open-std.org . https://web.archive.org/web/20221225070836/https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2270.pdf . December 25, 2022 . 2018-07-06 . live.
  51. Web site: WG14-N2267: The nodiscard attribute . open-std.org . https://web.archive.org/web/20221019131846/https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2267.pdf . October 19, 2022 . 2018-07-06 . live.
  52. Web site: WG14-N2764: The noreturn attribute . open-std.org . https://web.archive.org/web/20221225063437/https://open-std.org/JTC1/SC22/WG14/www/docs/n2764.pdf . December 25, 2022 . 2021-06-21 . live.
  53. Web site: WG14-N2557: Allow Duplicate Attributes . open-std.org . https://web.archive.org/web/20221128133337/https://open-std.org/JTC1/SC22/WG14/www/docs/n2557.pdf . November 28, 2022 . 2020-09-01 . live.
  54. Web site: WG14-N2418: Adding the u8 character prefix . open-std.org . https://web.archive.org/web/20230113210023/https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2418.pdf . January 13, 2023 . 2019-09-02 . live.
  55. https://stackoverflow.com/questions/31970111/what-is-the-point-of-the-utf-8-character-literals-proposed-for-c17#31970297 What is the point of the UTF-8 character literals proposed for C++17?; Stack Overflow.
  56. Web site: WG14-N2341: ISO/IEC TS 18661-2 - Floating-point extensions for C - Part 2: Decimal floating-point arithmetic . open-std.org . https://web.archive.org/web/20221121122559/https://open-std.org/JTC1/SC22/WG14/www/docs/n2341.pdf . November 21, 2022 . February 26, 2019 . live.
  57. Web site: WG14-N2601: Annex X - IEC 60559 interchange and extended types . open-std.org . https://web.archive.org/web/20221014221322/https://open-std.org/JTC1/SC22/WG14/www/docs/n2601.pdf . October 14, 2022 . October 15, 2020 . live.
  58. Web site: WG14-N3018: The constexpr specifier for object definitions . open-std.org . https://web.archive.org/web/20221224074302/https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3018.htm . December 24, 2022 . 2022-07-06 . live.
  59. Web site: WG14-N2653: char8_t: A type for UTF-8 characters and strings (Revision 1) . open-std.org . https://web.archive.org/web/20230527110842/https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2653.htm . May 27, 2023 . 2021-06-04 . live.
  60. Web site: WG14-N2728: char16_t & char32_t string literals shall be UTF-16 & UTF-32 . open-std.org . https://web.archive.org/web/20230527110756/https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2728.htm . May 27, 2023 . 2021-05-15 . live.
  61. Web site: WG14-N3038: Introduce storage-class specifiers for compound literals . open-std.org . https://web.archive.org/web/20221126130057/https://open-std.org/JTC1/SC22/WG14/www/docs/n3038.htm . November 26, 2022 . 2022-07-21 . live.
  62. Web site: WG14-N2940: Removing trigraphs??! . open-std.org . https://web.archive.org/web/20221026005747/https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2940.pdf . October 26, 2022 . 2022-03-02 . live.
  63. Web site: WG14-N2432: Remove support for function definitions with identifier lists proposal . open-std.org . https://web.archive.org/web/20221227012244/https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2432.pdf . December 27, 2022 . September 25, 2019 . live.
  64. Web site: WG14-N2841: No function declarators without prototypes . open-std.org . https://web.archive.org/web/20221112154740/https://www9.open-std.org/jtc1/sc22/wg14/www/docs/n2841.htm . November 12, 2022 . 2021-10-10 . live.
  65. Web site: WG14-N2412: Two's complement sign representation . open-std.org . https://web.archive.org/web/20221227174224/https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2412.pdf . December 27, 2022 . August 11, 2019 . live.
  66. Web site: WG14-N2993: Make *_HAS_SUBNORM be obsolescent . open-std.org . https://web.archive.org/web/20221205194635/https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2993.htm . December 5, 2022 . 2022-06-06 . live.
  67. Web site: GCC 9 Release Notes . GNU Project . https://web.archive.org/web/20221227032646/https://gcc.gnu.org/gcc-9/changes.html . December 27, 2022 . live.
  68. Web site: Clang 9.0 - add new language mode for C2x . LLVM Project Repository . https://web.archive.org/web/20221227032640/https://github.com/llvm/llvm-project/commit/d06f3917913d2558b771ccc48d838f8cd8993c01 . December 27, 2022 . May 14, 2019 . live.
  69. Web site: Pelles C - major changes between 10.00 and 11.00 . smorgasbordet.com . https://web.archive.org/web/20221227032644/http://www.smorgasbordet.com/pellesc/changes_1000_1100.htm . December 27, 2022 . live.