Skip to content
Snippets Groups Projects
Commit 9a265c97 authored by Joseph Myers's avatar Joseph Myers
Browse files

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.
parent 05432288
No related branches found
No related tags found
No related merge requests found
Showing
with 151 additions and 0 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment