[PATCH] D24669: {Sema] Gcc compatibility of vector shift.

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 3 13:06:26 PDT 2016


aaron.ballman added inline comments.


> vbyakovlcl wrote in DiagnosticGroups.td:522
> 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.

I would not add this as a diagnostic group, but instead use an ad-hoc group on the diagnostic itself. I don't think this is going to see very many diagnostics covered by the same group, but if that turns out to be the case, we can switch then.

> vbyakovlcl wrote in DiagnosticSemaKinds.td:2306
> The question is: would we like to have the feature as a clang extension?

I'm not the best one to answer that question, but we typically avoid adding new off-by-default diagnostics. Since GCC prints this as an error message and this patch is for GCC compatibility, it seems weird to me to add this as an off-by-default warning.

Repository:
  rL LLVM

https://reviews.llvm.org/D24669





More information about the cfe-commits mailing list