]> git.ipfire.org Git - thirdparty/gcc.git/commit
libcpp: Adjust __STDC_VERSION__ for C23
authorJakub Jelinek <jakub@redhat.com>
Tue, 30 Apr 2024 06:58:39 +0000 (08:58 +0200)
committerJakub Jelinek <jakub@redhat.com>
Tue, 30 Apr 2024 06:58:39 +0000 (08:58 +0200)
commita2452a68917bcf2d45fd911de779f8e9911c4ca6
treeb9cd1073b7e1ff2849bf69b802fbb02f647dc40d
parentbd35a92f8d44e91c96e8b6f01805fe4a68acf9eb
libcpp: Adjust __STDC_VERSION__ for C23

While the C23 standard isn't officially release yet,
in 2011 we've changed __STDC_VERSION__ value for C11 already
in the month in which the new __STDC_VERSION__ value has been
finalized, so we want to change this now or wait
until we implement all the C23 features?

Note, seems Clang up to 17 also used 202000L for -std=c2x but
Clang 18+ uses 202311L as specified in the latest C23 drafts.

2024-04-30  Jakub Jelinek  <jakub@redhat.com>

* init.cc (cpp_init_builtins): Change __STDC_VERSION__
for C23 from 202000L to 202311L.

* doc/cpp.texi (__STDC_VERSION__): Document 202311L value
for -std=c23/-std=gnu23.
gcc/doc/cpp.texi
libcpp/init.cc