This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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 ()


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]