This is the mail archive of the gcc-bugs@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]

[Bug c/30428] vector float | vector float is accepted



------- Comment #1 from pinskia at gcc dot gnu dot org  2007-07-09 08:19 -------
Here is a patch for the C front-end:
Index: c-typeck.c
===================================================================
--- c-typeck.c  (revision 126424)
+++ c-typeck.c  (working copy)
@@ -7881,7 +7898,9 @@
     case BIT_XOR_EXPR:
       if (code0 == INTEGER_TYPE && code1 == INTEGER_TYPE)
        shorten = -1;
-      else if (code0 == VECTOR_TYPE && code1 == VECTOR_TYPE)
+      else if (code0 == VECTOR_TYPE && code1 == VECTOR_TYPE
+              && !VECTOR_FLOAT_TYPE_P (type0)
+              && !VECTOR_FLOAT_TYPE_P (type1))
        common = 1;
       break;



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30428


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