rnk added a comment.

After writing r266366, we discovered that GCC accepts none of the code in that 
test case, so we should consider turning -flax-vector-conversions off by 
default.


================
Comment at: test/Sema/vector-cast.c:65
@@ -59,1 +64,3 @@
+  d = f2;
+  d = d + f2;
 }
----------------
Why should we allow this conversion? I don't see how <2 x float> and double 
should be convertible. I'm not sure why we allow `f2 += d` above, but I think 
of it as "widening" the type from scalar to vector.

Would it be OK for your if we tightened our lax vector conversion checks to 
just allow conversion from `<1 x T>` to `T`? The test case in the summary seems 
like pretty reasonable code, even if GCC rejects.


http://reviews.llvm.org/D21700



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to