From: Bart Van Assche Date: Tue, 14 Sep 2010 15:33:00 +0000 (+0000) Subject: PowerPC, Altivec: avoid using typedefs in combination with the vector keyword. X-Git-Tag: svn/VALGRIND_3_6_0~99 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=235c2a8df3804e007c761ebdb0a8727543f7383c;p=thirdparty%2Fvalgrind.git PowerPC, Altivec: avoid using typedefs in combination with the vector keyword. Patch by Maynard Johnson (see also #247526). git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11358 --- diff --git a/none/tests/ppc32/jm-insns.c b/none/tests/ppc32/jm-insns.c index 72556f3672..5ed0fabb63 100644 --- a/none/tests/ppc32/jm-insns.c +++ b/none/tests/ppc32/jm-insns.c @@ -170,10 +170,19 @@ case I chased). #include "tests/malloc.h" // memalign16 /* Something of the same size as void*, so can be safely be coerced - to/from a pointer type. Also same size as the host's gp registers. */ + * to/from a pointer type. Also same size as the host's gp registers. + * According to the AltiVec section of the GCC manual, the syntax does + * not allow the use of a typedef name as a type specifier in conjunction + * with the vector keyword, so typedefs uint[32|64]_t are #undef'ed here + * and redefined using #define. + */ #ifndef __powerpc64__ +#undef uint32_t +#define uint32_t unsigned int typedef uint32_t HWord_t; #else +#undef uint64_t +#define uint64_t unsigned long typedef uint64_t HWord_t; #endif // #ifndef __powerpc64__