On Tue, Sep 27, 2016 at 03:23:52PM +0200, Richard Biener wrote: > On Tue, Sep 27, 2016 at 3:13 PM, Jakub Jelinek <ja...@redhat.com> wrote: > > On Tue, Sep 27, 2016 at 03:09:36PM +0200, Richard Biener wrote: > >> On Tue, Sep 27, 2016 at 3:05 PM, Marek Polacek <pola...@redhat.com> wrote: > >> > Using -Wno-error where only -Wno-implicit-fallthrough was meant was > >> > deemed > >> > to coarse, so this patch attempts to add a configure check for this > >> > warnign > >> > and only use -Wno-implicit-fallthrough when appropriate. > >> > > >> > Bootstrapped on x86_64-linux and ppc64-linux, ok for trunk? > >> > >> It looks to me this would hide eventual bugs in .md files by not > >> issueing the warning? > > > > Guess it depends on what kind of warnings we want to suppress here, if it is > > something user can control in their *.md files, or something that perhaps > > changes to the generators could handle (add /* FALLTHRU */ comments or > > gcc_fallthrough (); in some cases)? > > I just looked at one random one and it was sse.md (repeatedly doing) > > case MODE_V16SF: > gcc_assert (TARGET_AVX512F); > case MODE_V8SF: > gcc_assert (TARGET_AVX); > case MODE_V4SF: > gcc_assert (TARGET_SSE); > ...
These were the easy cases. Now that I investigated more, I think the rest can be fixed by making genattrtab.c emit the /* FALLTHRU */ comments. See <https://gcc.gnu.org/ml/gcc-patches/2016-09/msg02024.html> -- so I think we might not need this configure check at all in the end. Marek