sim: cris: fix -Wimplicit-fallthrough warnings
authorMike Frysinger <vapier@gentoo.org>
Thu, 21 Dec 2023 06:54:31 +0000 (01:54 -0500)
committerMike Frysinger <vapier@gentoo.org>
Thu, 21 Dec 2023 06:59:22 +0000 (01:59 -0500)
Replace some fall through comments with the attribute.

sim/cris/cris-tmpl.c
sim/cris/traps.c

index b39583c..232085c 100644 (file)
@@ -67,6 +67,10 @@ MY (f_break_handler) (SIM_CPU *cpu, USI breaknum, USI pc)
       cris_break_13_handler (cpu, /* TARGET_SYS_exit */ 1, 0,
                             0, 0, 0, 0, 0, pc);
 
+      /* This shouldn't be reached, but we can't mark break 13 as noreturn
+        since there are some calls which should return.  */
+      ATTRIBUTE_FALLTHROUGH;
+
     default:
       abort ();
     }
index 29b1b7c..cd4cfd9 100644 (file)
@@ -1527,7 +1527,7 @@ cris_break_13_handler (SIM_CPU *current_cpu, USI callnum, USI arg1,
                  retval = TARGET_O_WRONLY;
                  break;
                }
-             /* FALLTHROUGH */
+             ATTRIBUTE_FALLTHROUGH;
            default:
              /* Nothing else is implemented.  */
              retval