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]

permit unary plus to be used with vector types


Up to 3.4.0, applying a unary plus to a vector type is rejected; here is
the one line fix for this. I am not aware of an exisiting bug number for
this.

Jan

--- /usr/local/src/gcc-3.4.0/gcc/c-typeck.c	2004-03-31
02:24:49.000000000 +0200
+++ 3.4.0/gcc/c-typeck.c	2004-05-12 10:08:35.000000000 +0200
@@ -2194,7 +2202,8 @@
 	 is enough to prevent anybody from looking inside for
 	 associativity, but won't generate any code.  */
       if (!(typecode == INTEGER_TYPE || typecode == REAL_TYPE
-	    || typecode == COMPLEX_TYPE))
+	    || typecode == COMPLEX_TYPE
+	    || typecode == VECTOR_TYPE))
 	{
 	  error ("wrong type argument to unary plus");
 	  return error_mark_node;


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