From b356d0c5a04fd207c11bfabc8a0474e75d25a601 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Thu, 21 Dec 2023 01:54:31 -0500 Subject: sim: cris: fix -Wimplicit-fallthrough warnings Replace some fall through comments with the attribute. --- sim/cris/cris-tmpl.c | 4 ++++ sim/cris/traps.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/sim/cris/cris-tmpl.c b/sim/cris/cris-tmpl.c index b39583c..232085c 100644 --- a/sim/cris/cris-tmpl.c +++ b/sim/cris/cris-tmpl.c @@ -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 (); } diff --git a/sim/cris/traps.c b/sim/cris/traps.c index 29b1b7c..cd4cfd9 100644 --- a/sim/cris/traps.c +++ b/sim/cris/traps.c @@ -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 -- cgit v1.1