aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/s390
diff options
context:
space:
mode:
authorAndreas Krebbel <krebbel@linux.ibm.com>2021-05-18 08:51:08 +0200
committerAndreas Krebbel <krebbel@linux.ibm.com>2021-05-18 08:51:50 +0200
commit7e75d62442fc3707c96c53d22f6c185fdf893c72 (patch)
treed7fc14869e3198702ed171c78e051f0c91d7d354 /gcc/config/s390
parent720dff974ea0487c35c0a4bfa527f30df5066ce1 (diff)
downloadgcc-7e75d62442fc3707c96c53d22f6c185fdf893c72.zip
gcc-7e75d62442fc3707c96c53d22f6c185fdf893c72.tar.gz
gcc-7e75d62442fc3707c96c53d22f6c185fdf893c72.tar.bz2
IBM Z: Support vector _Bool language extension
_Bool needs to be defined as macro in order to trigger the context-sensitive macro expansion mechanism. gcc/ChangeLog: * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal): Define _Bool as macro expanding to _Bool. gcc/testsuite/ChangeLog: * gcc.target/s390/zvector/vec-_Bool.c: New test.
Diffstat (limited to 'gcc/config/s390')
-rw-r--r--gcc/config/s390/s390-c.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/config/s390/s390-c.c b/gcc/config/s390/s390-c.c
index 7dbd8bf..4cce261 100644
--- a/gcc/config/s390/s390-c.c
+++ b/gcc/config/s390/s390-c.c
@@ -367,6 +367,8 @@ s390_cpu_cpp_builtins_internal (cpp_reader *pfile,
old_opts, opts, "vector=vector", "vector");
s390_def_or_undef_macro (pfile, target_flag_set_p (MASK_ZVECTOR),
old_opts, opts, "bool=bool", "bool");
+ s390_def_or_undef_macro (pfile, target_flag_set_p (MASK_ZVECTOR),
+ old_opts, opts, "_Bool=_Bool", "_Bool");
if (TARGET_ZVECTOR_P (opts->x_target_flags) && __vector_keyword == NULL)
{
__vector_keyword = get_identifier ("__vector");