diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-05-29 07:06:35 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-05-29 07:06:35 +0000 |
commit | fd36071f55a6a2b2fec2cc22784c3a7347bd60f8 (patch) | |
tree | 96dbd86211f5253bdf919bc13d504c90dced6235 /gcc/config | |
parent | de84ad029c2783ada53d07265be2a81710d8eba7 (diff) | |
download | gcc-fd36071f55a6a2b2fec2cc22784c3a7347bd60f8.tar.gz |
PR target/40017
* config/rs6000/rs6000-c.c (_Bool_keyword): New variable.
(altivec_categorize_keyword, init_vector_keywords,
rs6000_cpu_cpp_builtins): Define _Bool as conditional macro
similar to bool.
* gcc.target/powerpc/altivec-types-1.c: Don't expect error for
__vector _Bool.
* gcc.target/powerpc/altivec-30.c: New test.
* gcc.target/powerpc/altivec-31.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@147970 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config')
-rw-r--r-- | gcc/config/rs6000/rs6000-c.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/config/rs6000/rs6000-c.c b/gcc/config/rs6000/rs6000-c.c index c7adcdb5e04..33bbd65bff7 100644 --- a/gcc/config/rs6000/rs6000-c.c +++ b/gcc/config/rs6000/rs6000-c.c @@ -91,6 +91,7 @@ static GTY(()) tree __pixel_keyword; static GTY(()) tree pixel_keyword; static GTY(()) tree __bool_keyword; static GTY(()) tree bool_keyword; +static GTY(()) tree _Bool_keyword; /* Preserved across calls. */ static tree expand_bool_pixel; @@ -111,6 +112,9 @@ altivec_categorize_keyword (const cpp_token *tok) if (ident == C_CPP_HASHNODE (bool_keyword)) return C_CPP_HASHNODE (__bool_keyword); + if (ident == C_CPP_HASHNODE (_Bool_keyword)) + return C_CPP_HASHNODE (__bool_keyword); + return ident; } @@ -141,6 +145,9 @@ init_vector_keywords (void) bool_keyword = get_identifier ("bool"); C_CPP_HASHNODE (bool_keyword)->flags |= NODE_CONDITIONAL; + + _Bool_keyword = get_identifier ("_Bool"); + C_CPP_HASHNODE (_Bool_keyword)->flags |= NODE_CONDITIONAL; } /* Called to decide whether a conditional macro should be expanded. @@ -295,6 +302,7 @@ rs6000_cpu_cpp_builtins (cpp_reader *pfile) builtin_define ("vector=vector"); builtin_define ("pixel=pixel"); builtin_define ("bool=bool"); + builtin_define ("_Bool=_Bool"); init_vector_keywords (); /* Enable context-sensitive macros. */ |