[PATCH/committed,19/20] sim: sh: fix -Wimplicit-fallthrough warnings

Message ID 20231221070127.19142-19-vapier@gentoo.org
State New
Headers
Series [PATCH/committed,01/20] sim: signal: mark signal callback funcs as noreturn since they don't return |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gdb_build--master-arm warning Patch is already merged
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 warning Patch is already merged

Commit Message

Mike Frysinger Dec. 21, 2023, 7:01 a.m. UTC
  These generate conditional insns where it tests, then fallsthru.
---
 sim/sh/gencode.c | 1 +
 1 file changed, 1 insertion(+)
  

Patch

diff --git a/sim/sh/gencode.c b/sim/sh/gencode.c
index 1835cf92ff3f..9683dc46b86a 100644
--- a/sim/sh/gencode.c
+++ b/sim/sh/gencode.c
@@ -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");