mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-02-25 18:05:44 +08:00
rs6000-c.c (rs6000_macro_to_expand): If macro following vector keyword has expansion starting with pixel or bool...
* config/rs6000/rs6000-c.c (rs6000_macro_to_expand): If macro following vector keyword has expansion starting with pixel or bool keyword, expand vector to __vector and pixel or bool to __pixel or __bool. * gcc.target/powerpc/altivec-28.c: New test. From-SVN: r145199
This commit is contained in:
parent
574872ff83
commit
b3bf8855c0
@ -1,5 +1,10 @@
|
||||
2009-03-28 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* config/rs6000/rs6000-c.c (rs6000_macro_to_expand): If macro
|
||||
following vector keyword has expansion starting with pixel or bool
|
||||
keyword, expand vector to __vector and pixel or bool to __pixel or
|
||||
__bool.
|
||||
|
||||
PR c++/39554
|
||||
* opts.c (warning_disallowed_functions, warn_disallowed_functions,
|
||||
warn_if_disallowed_function_p): Removed.
|
||||
|
@ -188,7 +188,19 @@ rs6000_macro_to_expand (cpp_reader *pfile, const cpp_token *tok)
|
||||
tok = cpp_peek_token (pfile, idx++);
|
||||
while (tok->type == CPP_PADDING);
|
||||
ident = altivec_categorize_keyword (tok);
|
||||
if (ident)
|
||||
if (ident == C_CPP_HASHNODE (__pixel_keyword))
|
||||
{
|
||||
expand_this = C_CPP_HASHNODE (__vector_keyword);
|
||||
expand_bool_pixel = __pixel_keyword;
|
||||
rid_code = RID_MAX;
|
||||
}
|
||||
else if (ident == C_CPP_HASHNODE (__bool_keyword))
|
||||
{
|
||||
expand_this = C_CPP_HASHNODE (__vector_keyword);
|
||||
expand_bool_pixel = __bool_keyword;
|
||||
rid_code = RID_MAX;
|
||||
}
|
||||
else if (ident)
|
||||
rid_code = (enum rid)(ident->rid_code);
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
2009-03-28 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* gcc.target/powerpc/altivec-28.c: New test.
|
||||
|
||||
PR c++/39554
|
||||
* gcc.dg/wdisallowed-functions-1.c: Removed.
|
||||
* gcc.dg/wdisallowed-functions-2.c: Removed.
|
||||
|
16
gcc/testsuite/gcc.target/powerpc/altivec-28.c
Normal file
16
gcc/testsuite/gcc.target/powerpc/altivec-28.c
Normal file
@ -0,0 +1,16 @@
|
||||
/* { dg-do compile { target powerpc*-*-* } } */
|
||||
/* { dg-require-effective-target powerpc_altivec_ok } */
|
||||
/* { dg-options "-maltivec" } */
|
||||
|
||||
#define B bool
|
||||
#define P pixel
|
||||
#define I int
|
||||
#define BI bool int
|
||||
#define PI pixel int
|
||||
|
||||
vector B int i;
|
||||
vector P int j;
|
||||
vector B I k;
|
||||
vector P I l;
|
||||
vector BI m;
|
||||
vector PI n;
|
Loading…
Reference in New Issue
Block a user