dblaikie added a comment. In D100581#2727432 <https://reviews.llvm.org/D100581#2727432>, @mbenfield wrote:
> In D100581#2727357 <https://reviews.llvm.org/D100581#2727357>, @dblaikie > wrote: > >> > > > >> Got a link/examples of cases GCC does and doesn't warn about? I'd assume >> it'd have something to do with the triviality or non-triviality of certain >> operations of the nonscalar types (eg: is the type trivially >> assignable/trivially destructible) > > This doesn't seem to be what determines it. AFAICT it never warns for a > struct in C++. However, if I do > > gcc -fsyntax-only -Wunused-but-set-variable > clang/test/Sema/vector-gcc-compat.c > > I get warnings for the variables v2i64_r and v4i32_r. > > But if I do > > g++ -fsyntax-only -Wunused-but-set-variable > clang/test/Sema/vector-gcc-compat.c > > I only get warnings for the variable v2i64_r. > > I will investigate a little more tomorrow. Ah, might have a size threshold? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100581/new/ https://reviews.llvm.org/D100581 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits