diff options
author | Martin Liska <mliska@suse.cz> | 2022-09-12 10:43:19 +0200 |
---|---|---|
committer | Martin Liska <mliska@suse.cz> | 2022-09-12 10:43:19 +0200 |
commit | fdb97cd0b7d15efa39ba79dca44be93debb0ef12 (patch) | |
tree | 65a6d95503fb9897bda29c72a629e57bb773d1c1 /gcc/ginclude | |
parent | 918bc838c2803f08e4d7ccd179396d48cb8ec804 (diff) | |
parent | 643ae816f17745a77b62188b6bf169211609a59b (diff) | |
download | gcc-fdb97cd0b7d15efa39ba79dca44be93debb0ef12.zip gcc-fdb97cd0b7d15efa39ba79dca44be93debb0ef12.tar.gz gcc-fdb97cd0b7d15efa39ba79dca44be93debb0ef12.tar.bz2 |
Merge branch 'master' into devel/sphinx
Diffstat (limited to 'gcc/ginclude')
-rw-r--r-- | gcc/ginclude/stdalign.h | 3 | ||||
-rw-r--r-- | gcc/ginclude/stdbool.h | 5 | ||||
-rw-r--r-- | gcc/ginclude/stddef.h | 4 |
3 files changed, 8 insertions, 4 deletions
diff --git a/gcc/ginclude/stdalign.h b/gcc/ginclude/stdalign.h index b10cad1..6ed4243 100644 --- a/gcc/ginclude/stdalign.h +++ b/gcc/ginclude/stdalign.h @@ -26,7 +26,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #ifndef _STDALIGN_H #define _STDALIGN_H -#ifndef __cplusplus +#if (!defined __cplusplus \ + && !(defined __STDC_VERSION__ && __STDC_VERSION__ > 201710L)) #define alignas _Alignas #define alignof _Alignof diff --git a/gcc/ginclude/stdbool.h b/gcc/ginclude/stdbool.h index fe500d9..bcf7839 100644 --- a/gcc/ginclude/stdbool.h +++ b/gcc/ginclude/stdbool.h @@ -30,11 +30,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #ifndef __cplusplus -#define bool _Bool #if defined __STDC_VERSION__ && __STDC_VERSION__ > 201710L -#define true ((_Bool)+1u) -#define false ((_Bool)+0u) +/* bool, true and false are keywords. */ #else +#define bool _Bool #define true 1 #define false 0 #endif diff --git a/gcc/ginclude/stddef.h b/gcc/ginclude/stddef.h index 315ff78..3d29213 100644 --- a/gcc/ginclude/stddef.h +++ b/gcc/ginclude/stddef.h @@ -451,6 +451,10 @@ typedef struct { #endif #endif /* C23. */ +#if defined __STDC_VERSION__ && __STDC_VERSION__ > 201710L +#define unreachable() (__builtin_unreachable ()) +#endif + #endif /* _STDDEF_H was defined this time */ #endif /* !_STDDEF_H && !_STDDEF_H_ && !_ANSI_STDDEF_H && !__STDDEF_H__ |