This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/30428] vector float | vector float is accepted
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 Jul 2007 08:19:52 -0000
- Subject: [Bug c/30428] vector float | vector float is accepted
- References: <bug-30428-6528@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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