diff mbox series

[RFC,v3,46/78] disas: add fallthrough pseudo-keyword

Message ID 6470aad157306403e22f24d9b60bd041eb602366.1697186560.git.manos.pitsidianakis@linaro.org (mailing list archive)
State New, archived
Headers show
Series Strict disable implicit fallthrough | expand

Commit Message

Manos Pitsidianakis Oct. 13, 2023, 8:46 a.m. UTC
In preparation of raising -Wimplicit-fallthrough to 5, replace all
fall-through comments with the fallthrough attribute pseudo-keyword.

Signed-off-by: Emmanouil Pitsidianakis <manos.pitsidianakis@linaro.org>
---
 disas/hppa.c  | 4 ++--
 disas/m68k.c  | 2 +-
 disas/sh4.c   | 6 +++---
 disas/sparc.c | 2 +-
 4 files changed, 7 insertions(+), 7 deletions(-)
diff mbox series

Patch

diff --git a/disas/hppa.c b/disas/hppa.c
index dcf9a47f34..1a2bdb8d39 100644
--- a/disas/hppa.c
+++ b/disas/hppa.c
@@ -2027,7 +2027,7 @@  print_insn_hppa (bfd_vma memaddr, disassemble_info *info)
 			 completer.  */
 		    case 'X':
 		      fputs_filtered (" ", info);
-		      /* FALLTHRU */
+		      fallthrough;
 
 		    case 'A':
 		      if (GET_FIELD (insn, 24, 24))
@@ -2104,7 +2104,7 @@  print_insn_hppa (bfd_vma memaddr, disassemble_info *info)
 			 format completer.  */
 		    case 'E':
 		      fputs_filtered (" ", info);
-		      /* FALLTHRU */
+		      fallthrough;
 
 		    case 'e':
 		      if (GET_FIELD (insn, 30, 30))
diff --git a/disas/m68k.c b/disas/m68k.c
index 1f16e295ab..a755951bb7 100644
--- a/disas/m68k.c
+++ b/disas/m68k.c
@@ -1623,7 +1623,7 @@  print_insn_arg (const char *d,
 
     case 'X':
       place = '8';
-      /* fall through */
+      fallthrough;
     case 'Y':
     case 'Z':
     case 'W':
diff --git a/disas/sh4.c b/disas/sh4.c
index dcdbdf26d8..f7c95407ca 100644
--- a/disas/sh4.c
+++ b/disas/sh4.c
@@ -1757,7 +1757,7 @@  print_insn_sh (bfd_vma memaddr, struct disassemble_info *info)
 	    case REG_N_D:
 	      if ((nibs[n] & 1) != 0)
 		goto fail;
-	      /* fall through */
+        fallthrough;
 	    case REG_N:
 	      rn = nibs[n];
 	      break;
@@ -1963,7 +1963,7 @@  print_insn_sh (bfd_vma memaddr, struct disassemble_info *info)
 		  fprintf_fn (stream, "xd%d", rn & ~1);
 		  break;
 		}
-	      /* fallthrough */
+        fallthrough;
 	    case D_REG_N:
 	      fprintf_fn (stream, "dr%d", rn);
 	      break;
@@ -1973,7 +1973,7 @@  print_insn_sh (bfd_vma memaddr, struct disassemble_info *info)
 		  fprintf_fn (stream, "xd%d", rm & ~1);
 		  break;
 		}
-	      /* fallthrough */
+        fallthrough;
 	    case D_REG_M:
 	      fprintf_fn (stream, "dr%d", rm);
 	      break;
diff --git a/disas/sparc.c b/disas/sparc.c
index 5689533ce1..61139256b0 100644
--- a/disas/sparc.c
+++ b/disas/sparc.c
@@ -2803,7 +2803,7 @@  print_insn_sparc (bfd_vma memaddr, disassemble_info *info)
                   {
                   case '+':
                     found_plus = 1;
-                    /* Fall through.  */
+                    fallthrough;
 
                   default:
                     (*info->fprintf_func) (stream, "%c", *s);