From: Mike Frysinger Date: Thu, 21 Dec 2023 06:39:26 +0000 (-0500) Subject: sim: sh: fix -Wimplicit-fallthrough warnings X-Git-Tag: binutils-2_42~444 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=849bdf4ead7a19ebde74fa4caec8643bf71da3e3;p=thirdparty%2Fbinutils-gdb.git sim: sh: fix -Wimplicit-fallthrough warnings These generate conditional insns where it tests, then fallsthru. --- diff --git a/sim/sh/gencode.c b/sim/sh/gencode.c index 1835cf92ff3..9683dc46b86 100644 --- a/sim/sh/gencode.c +++ b/sim/sh/gencode.c @@ -3296,6 +3296,7 @@ ppi_gensim (void) case 'c': printf (" if ((((iword >> 8) ^ DSR) & 1) == 0)\n"); printf ("\treturn;\n"); + printf (" ATTRIBUTE_FALLTHROUGH;\n"); printf (" }\n"); printf (" case %d:\n", p->index + 1); printf (" {\n");