Implement -Wimplicit-fallthrough (version 9)

Rainer Orth ro@CeBiTec.Uni-Bielefeld.DE
Mon Sep 26 20:36:00 GMT 2016


Hi Jakub,

> On Mon, Sep 26, 2016 at 03:34:40PM +0200, Rainer Orth wrote:
>> Ok for mainline if the bootstraps pass (with appropriate changelog
>> entries, of course)?
>
> Yes.

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.

>> diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
>> --- a/gcc/config/i386/i386.c
>> +++ b/gcc/config/i386/i386.c
>> @@ -17917,6 +17917,7 @@ ix86_print_operand (FILE *file, rtx x, i
>>  #ifdef HAVE_AS_IX86_CMOV_SUN_SYNTAX
>>  	  if (ASSEMBLER_DIALECT == ASM_ATT)
>>  	    putc ('.', file);
>> +	  gcc_fallthrough ();
>>  #endif
>
> Where have you been adding the /*FALLTHROUGH*/ ?  Before #endif or after it?

Before: seemed natural to me.

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University



More information about the Gcc-patches mailing list