This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH, testsuite]: make altivec-23.c standards conforming
- From: Ben Elliston <bje at au1 dot ibm dot com>
- To: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Cc: janis187 <janis187 at us dot ibm dot com>
- Date: Wed, 14 Nov 2007 13:44:51 +1100
- Subject: [PATCH, testsuite]: make altivec-23.c standards conforming
I discovered that the test gcc.target/powerpc/altivec-23.c does not
conform the AltiVec Programming Interface Manual (section 2.2), which
states:
"The syntax does not allow the use of a typedef name as a type
specifier. For example, the following is not allowed:
typedef signed short int16;
vector int16 data;"
Okay for mainline? Thanks,
Ben
2007-11-14 Ben Elliston <bje@au.ibm.com>
* gcc.target/powerpc/altivec-23.c: Do not use a typedef name as a
type specifier, as this is not permitted according to the AltiVec
Programming Interface Manual.
Index: altivec-23.c
===================================================================
--- altivec-23.c (revision 130161)
+++ altivec-23.c (working copy)
@@ -8,9 +8,8 @@
#include <altivec.h>
-typedef int bt;
-typedef vector bt vt;
-typedef struct { vt x; bt y[sizeof(vt) / sizeof (bt)]; } st;
+typedef vector int vt;
+typedef struct { vt x; int y[sizeof(vt) / sizeof (int)]; } st;
#define INIT { 1, 2, 3, 4 }
void f ()