]> git.ipfire.org Git - thirdparty/gcc.git/commit
ginclude: C2x header version macros
authorJoseph Myers <joseph@codesourcery.com>
Sun, 13 Nov 2022 12:58:49 +0000 (12:58 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Sun, 13 Nov 2022 12:58:49 +0000 (12:58 +0000)
commit9a265c974cd85b8eae5ea607185e689f063db4a1
treedd448b1b879af726d374eef572b0405f37094fdd
parent05432288d4e560556ee0455562639b715d8f8b7d
ginclude: C2x header version macros

C2x adds __STDC_VERSION_*_H__ macros to individual headers with
interface changes compared to C17.  All the new header features in
headers provided by GCC have now been implemented, so define those
macros to the value given in the current working draft.

Bootstrapped with no regressions for x86_64-pc-linux-gnu.

gcc/
* ginclude/float.h [__STDC_VERSION__ > 201710L]
(__STDC_VERSION_FLOAT_H__): New macro.
* ginclude/stdarg.h [__STDC_VERSION__ > 201710L]
(__STDC_VERSION_STDARG_H__): New macro.
* ginclude/stdatomic.h [__STDC_VERSION__ > 201710L]
(__STDC_VERSION_STDATOMIC_H__): New macro.
* ginclude/stddef.h [__STDC_VERSION__ > 201710L]
(__STDC_VERSION_STDDEF_H__): New macro.
* ginclude/stdint-gcc.h [__STDC_VERSION__ > 201710L]
(__STDC_VERSION_STDINT_H__): New macro.
* glimits.h [__STDC_VERSION__ > 201710L]
(__STDC_VERSION_LIMITS_H__): New macro.

gcc/testsuite/
* gcc.dg/c11-float-8.c, gcc.dg/c11-limits-1.c,
gcc.dg/c11-stdarg-4.c, gcc.dg/c11-stdatomic-3.c,
gcc.dg/c11-stddef-1.c, gcc.dg/c11-stdint-1.c,
gcc.dg/c2x-float-13.c, gcc.dg/c2x-limits-1.c,
gcc.dg/c2x-stdarg-5.c, gcc.dg/c2x-stdatomic-1.c,
gcc.dg/c2x-stddef-1.c, gcc.dg/c2x-stdint-1.c: New tests.
18 files changed:
gcc/ginclude/float.h
gcc/ginclude/stdarg.h
gcc/ginclude/stdatomic.h
gcc/ginclude/stddef.h
gcc/ginclude/stdint-gcc.h
gcc/glimits.h
gcc/testsuite/gcc.dg/c11-float-8.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/c11-limits-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/c11-stdarg-4.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/c11-stdatomic-3.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/c11-stddef-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/c11-stdint-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/c2x-float-13.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/c2x-limits-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/c2x-stdarg-5.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/c2x-stdatomic-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/c2x-stddef-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/c2x-stdint-1.c [new file with mode: 0644]