[PATCH] D24669: {Sema] Gcc compatibility of vector shift.
Vladimir Yakovlev via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 26 10:07:06 PDT 2016
vbyakovlcl added inline comments.
================
Comment at: llvm/tools/clang/include/clang/Basic/DiagnosticGroups.td:522
@@ -521,2 +521,3 @@
def GNUZeroVariadicMacroArguments : DiagGroup<"gnu-zero-variadic-macro-arguments">;
+def GNUVecElemSize : DiagGroup<"gnu-vec-elem-size">;
def Fallback : DiagGroup<"fallback">;
----------------
aaron.ballman wrote:
> Is this the same warning flag GCC uses?
Gcc prints error messages
t.c:21:13: error: invalid operands to binary << (have vector_int8 and vector_short8)
vi8 = vi8 << vs8;
I could not find a flag controlling this error.
================
Comment at: llvm/tools/clang/include/clang/Basic/DiagnosticSemaKinds.td:2306
@@ -2304,1 +2305,3 @@
+ "vector operands do not have the same elements sizes (%0 and %1)">,
+ InGroup<GNUVecElemSize>, DefaultIgnore;
def err_ext_vector_component_exceeds_length : Error<
----------------
aaron.ballman wrote:
> Why is this off by default?
The question is: would we like to have the feature as a clang extension?
Repository:
rL LLVM
https://reviews.llvm.org/D24669
More information about the cfe-commits
mailing list