From: Mike Frysinger Date: Thu, 21 Dec 2023 06:54:31 +0000 (-0500) Subject: sim: cris: fix -Wimplicit-fallthrough warnings X-Git-Tag: binutils-2_42~455 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b356d0c5a04fd207c11bfabc8a0474e75d25a601;p=thirdparty%2Fbinutils-gdb.git sim: cris: fix -Wimplicit-fallthrough warnings Replace some fall through comments with the attribute. --- diff --git a/sim/cris/cris-tmpl.c b/sim/cris/cris-tmpl.c index b39583cdb20..232085cf452 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 29b1b7cfdb3..cd4cfd9f020 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