bruno added inline comments.
================ Comment at: lib/Sema/SemaExpr.cpp:10024 + // FIXME: The check for C++ here is for GCC compatibility. GCC rejects the + // usage of logical operators with vectors in C. This check could be + // notionally dropped. ---------------- Please mention in the comment the list of logical ops that this applies to: "!, &&, ||" ================ Comment at: test/Sema/vector-gcc-compat.c:101 + + v2i64_r = v2i64_a && 1; // expected-error {{invalid vector operand to binary expression ('v2i64' (vector of 2 'long long' values))}} + v2i64_r = v2i64_a || 1; // expected-error {{invalid vector operand to binary expression ('v2i64' (vector of 2 'long long' values))}} ---------------- Is this because of && and others only working in C++? If so, we need a better error message here, along the lines of "logical expression with vector only support in C++". If later on we decide to support it in non-C++, we then get rid of the warning. https://reviews.llvm.org/D25866 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits