Implement -Wimplicit-fallthrough (take 2): the rest
Michael Matz
matz@suse.de
Thu Aug 4 12:37:00 GMT 2016
Hi,
On Wed, 27 Jul 2016, Marek Polacek wrote:
> And this is the rest. Either I just adjusted a falls through comment,
> or I added __builtin_fallthrough (). These were the cases where I was
> fairly sure that the fall through is intentional.
I saw one case where I think the warning is a bit over-active:
@@ -42072,6 +42089,7 @@ rdseed_step:
case IX86_BUILTIN_ADDCARRYX64:
icode = CODE_FOR_addcarrydi;
mode0 = DImode;
+ gcc_fallthrough ();
handlecarry:
arg0 = CALL_EXPR_ARG (exp, 0); /* unsigned char c_in. */
I.e. it also warns if the following label is not a case label but a normal
one. I don't think this counts as a classical fall-through and it IMHO
should not be warned about nor should it be marked.
Ciao,
Michael.
More information about the Gcc-patches
mailing list