sim: sh: fix -Wimplicit-fallthrough warnings
authorMike Frysinger <vapier@gentoo.org>
Thu, 21 Dec 2023 06:39:26 +0000 (01:39 -0500)
committerMike Frysinger <vapier@gentoo.org>
Thu, 21 Dec 2023 06:59:23 +0000 (01:59 -0500)
These generate conditional insns where it tests, then fallsthru.

sim/sh/gencode.c

index 1835cf9..9683dc4 100644 (file)
@@ -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");