Commit b3bf8855 by Jakub Jelinek Committed by Jakub Jelinek

rs6000-c.c (rs6000_macro_to_expand): If macro following vector keyword has…

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
parent 574872ff
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);
}
......
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.
......
/* { 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;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment