[PATCH] D157606: [C2x] Support -std=c23 and -std=gnu23

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 10 05:17:59 PDT 2023


aaron.ballman created this revision.
aaron.ballman added reviewers: clang-language-wg, jyknight, efriedma, hubert.reinterpretcast, cor3ntin.
Herald added subscribers: kadircet, arphaman.
Herald added a project: All.
aaron.ballman requested review of this revision.
Herald added projects: clang, clang-tools-extra.

C2x was finalized at the June 2023 WG14 meeting. The DIS is out for balloting and the comment period for that closes later this year/early next year. While that does leave an opportunity for more changes to the standard during the DIS ballot resolution process, only editorial changes are anticipated and as a result, the C committee considers C2x to be final. The committee took a straw poll on what we'd prefer the informal name of the standard be, and we decided it should be called C23 regardless of what year ISO publishes it.

However, because the final publication is not out, this patch does not add the language standard alias for the `-std=iso9899:<year>` spelling of the standard mode; that will be added once ISO finally publishes the document and the year chosen will match the publication date.

This also changes the value of `__STDC_VERSION__` from the placeholder value `202000L` to the final value `202311L`.

Subsequent patches will start renaming things from c2x to c23, cleaning up documentation, etc.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D157606

Files:
  clang-tools-extra/clangd/index/StdLib.cpp
  clang/docs/ReleaseNotes.rst
  clang/include/clang/Basic/LangStandards.def
  clang/lib/Frontend/InitPreprocessor.cpp
  clang/lib/Headers/limits.h
  clang/lib/Headers/stdalign.h
  clang/lib/Headers/stdarg.h
  clang/lib/Headers/stdatomic.h
  clang/lib/Headers/stddef.h
  clang/lib/Headers/stdint.h
  clang/test/C/C11/n1330.c
  clang/test/C/drs/dr0xx.c
  clang/test/C/drs/dr2xx.c
  clang/test/C/drs/dr3xx.c
  clang/test/C/drs/dr411.c
  clang/test/Driver/unknown-std.c
  clang/test/Headers/limits.cpp
  clang/test/Headers/stdint.c
  clang/test/Lexer/unicode.c
  clang/test/Lexer/utf8-char-literal.cpp
  clang/test/Preprocessor/c2x.c
  clang/test/Preprocessor/ucn-allowed-chars.c
  clang/test/Sema/atomic-expr.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D157606.548984.patch
Type: text/x-patch
Size: 36680 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230810/01cdcab3/attachment-0001.bin>


More information about the cfe-commits mailing list