diff options
author | Mike Frysinger <vapier@gentoo.org> | 2023-12-21 01:54:31 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2023-12-21 01:59:22 -0500 |
commit | b356d0c5a04fd207c11bfabc8a0474e75d25a601 (patch) | |
tree | 318e370b29b111a15c251dd1c695d2e00ef40e3e /sim/cris | |
parent | f0e2dc75ce0385bb187b1788ba353daa1598f47a (diff) | |
download | binutils-b356d0c5a04fd207c11bfabc8a0474e75d25a601.zip binutils-b356d0c5a04fd207c11bfabc8a0474e75d25a601.tar.gz binutils-b356d0c5a04fd207c11bfabc8a0474e75d25a601.tar.bz2 |
sim: cris: fix -Wimplicit-fallthrough warnings
Replace some fall through comments with the attribute.
Diffstat (limited to 'sim/cris')
-rw-r--r-- | sim/cris/cris-tmpl.c | 4 | ||||
-rw-r--r-- | sim/cris/traps.c | 2 |
2 files changed, 5 insertions, 1 deletions
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 |