aboutsummaryrefslogtreecommitdiff
path: root/gcc/ginclude/stdint-gcc.h
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2022-11-13 12:58:49 +0000
committerJoseph Myers <joseph@codesourcery.com>2022-11-13 12:58:49 +0000
commit9a265c974cd85b8eae5ea607185e689f063db4a1 (patch)
treedd448b1b879af726d374eef572b0405f37094fdd /gcc/ginclude/stdint-gcc.h
parent05432288d4e560556ee0455562639b715d8f8b7d (diff)
downloadgcc-9a265c974cd85b8eae5ea607185e689f063db4a1.zip
gcc-9a265c974cd85b8eae5ea607185e689f063db4a1.tar.gz
gcc-9a265c974cd85b8eae5ea607185e689f063db4a1.tar.bz2
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.
Diffstat (limited to 'gcc/ginclude/stdint-gcc.h')
-rw-r--r--gcc/ginclude/stdint-gcc.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/ginclude/stdint-gcc.h b/gcc/ginclude/stdint-gcc.h
index 6be01ae..eab651d 100644
--- a/gcc/ginclude/stdint-gcc.h
+++ b/gcc/ginclude/stdint-gcc.h
@@ -362,4 +362,8 @@ typedef __UINTMAX_TYPE__ uintmax_t;
#endif
+#if defined __STDC_VERSION__ && __STDC_VERSION__ > 201710L
+#define __STDC_VERSION_STDINT_H__ 202311L
+#endif
+
#endif /* _GCC_STDINT_H */