This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Patch for PR 16286
- From: "Ben Elliston" <bje at au1 dot ibm dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: aldyh at redhat dot com
- Date: 12 Aug 2004 15:40:41 +1000
- Subject: Patch for PR 16286
The following patch corrects PR 16286. The ability to #undefine
vector is specified in the Altivec PIM document. I have omitted the
patch to altivec.h here because (a) it is a mechanical change and (b)
the diff is enormous. The ChangeLog entry describes the change
adequately.
Tested with bootstrap and make check. Okay for mainline?
Ben
2004-08-12 Ben Elliston <bje@au.ibm.com>
* config/rs6000/altivec.h: Change vector to __vector throughout.
(Except for the `vector' macro itself).
2004-08-12 Ben Elliston <bje@au.ibm.com>
PR target/16286
* gcc.dg/pr16286.c: New test.
/* { dg-do compile { target powerpc*-*-* } } */
/* { dg-options "-maltivec" } */
/* PR 16286
* Compilation of a simple Altivec test program fails if vector is #undefined
* when compiling with -maltivec. This may be done for building C++ programs
* that use the STL <vector>.
*/
#include <altivec.h>
#undef vector
void test(void)
{
__vector unsigned int a, b;
a = vec_and(a, b);
}
/* { dg-bogus "syntax error before \"vector\"" "-maltivec" { target powerpc*-*-* } 0 } */