Implement -Wimplicit-fallthrough (version 9)
Marek Polacek
polacek@redhat.com
Sun Oct 9 09:20:00 GMT 2016
On Sat, Oct 08, 2016 at 07:04:41PM +0200, Eric Botcazou wrote:
> > testing completed successfully, so I've installed the patch with this
> > ChangeLog entry:
> >
> > 2016-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
> >
> > gcc:
> > * config/i386/i386.c (ix86_print_operand)
> > [HAVE_AS_IX86_CMOV_SUN_SYNTAX]: Add gcc_fallthrough.
> > * config/sparc/sparc.c (check_pic): Add fallthrough comment.
> > (epilogue_renumber): Likewise.
> >
> > gcc/ada:
> > * gcc-interface/decl.c: Fix fall through comment formatting.
> > * gcc-interface/misc.c: Likewise.
> > * gcc-interface/trans.c: Likewise.
> > * gcc-interface/utils.c: Likewise.
> > * gcc-interface/utils2.c: Likewise.
>
> This is a revealing example of how excessive pickiness in warnings can be
> counter-productive: after Jakub's latest patches (thanks!) accepting the
> original formatting of gcc-interface, I reverted part #2 of the above patch...
> only to discover that bootstrap was still broken because of a -Wimplicit-
> fallthrough warning, but this time for a missing break:
I really really don't see why anyone would think that those '...' bring
any additional information. Since Rainer has changed this, I see zero
point in changing it back.
> Index: gcc-interface/utils.c
> ===================================================================
> --- gcc-interface/utils.c (revision 324591)
> +++ gcc-interface/utils.c (working copy)
> @@ -4289,6 +4289,7 @@ convert (tree type, tree expr)
> TREE_TYPE (expr) = type;
> return expr;
> }
> + break;
>
> case CONSTRUCTOR:
> /* If we are converting a CONSTRUCTOR to a mere type variant, or to
>
> So the issue went unnoticed among the slew of false positives the first time
> and a genuine error was overlooked...
It wasn't overlooked, there was a bug that I've fixed already which caused
missing warnings.
Marek
More information about the Gcc-patches
mailing list