On Tue, Sep 27, 2016 at 3:13 PM, Jakub Jelinek <[email protected]> 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 <[email protected]> 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);
...
Richard.
>> > 2016-09-27 Marek Polacek <[email protected]>
>> >
>> > * Makefile.in (insn-attrtab.o-warn, insn-dfatab.o-warn,
>> > insn-latencytab.o-warn, insn-output.o-warn, insn-emit.o-warn): Use
>> > @W_NO_IMPLICIT_FALLTHROUGH@ instead of -Wno-error.
>> > * configure.ac: Add check for -Wimplicit-fallthrough.
>> > * configure: Regenerate.
>
> Jakub