-Wimplicit-fallthrough dodgy fixes
authorAlan Modra <amodra@gmail.com>
Thu, 6 Oct 2016 12:19:08 +0000 (22:49 +1030)
committerAlan Modra <amodra@gmail.com>
Thu, 6 Oct 2016 12:19:38 +0000 (22:49 +1030)
The comment logically belongs inside the preprocessor conditional,
but gcc's -Wimplicit-fallthrough loses track of it.  Revert when/if
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77817 is fixed.

* app.c (do_scrub_chars): Move fall through comment.
* expr.c (operand): Likewise.

gas/ChangeLog
gas/app.c
gas/expr.c

index 12f2e1988b9e3482288808acbe3a9b221e6eb6d0..c88f70fbadcaec2af30a144fe226996e63c24e0c 100644 (file)
@@ -1,3 +1,8 @@
+2016-10-06  Alan Modra  <amodra@gmail.com>
+
+       * app.c (do_scrub_chars): Move fall through comment.
+       * expr.c (operand): Likewise.
+
 2016-10-06  Matthew Fortune  <matthew.fortune@imgtec.com>
 
        PR gas/20648
index 4b53ce706127b55f56b0980d6ec42671202b015b..6b883a1f8a164e232658b1e8c306e45a2e0cfa5e 100644 (file)
--- a/gas/app.c
+++ b/gas/app.c
@@ -1322,8 +1322,8 @@ do_scrub_chars (size_t (*get) (char *, size_t), char *tostart, size_t tolen)
              else
                UNGET (quot);
            }
-         /* FALL THROUGH */
 #endif
+         /* Fall through.  */
 
        case LEX_IS_SYMBOL_COMPONENT:
          if (state == 10)
index b9983d86b688e3d7d3112624e655d2ed8e14412d..1cdd081322f3b291b55e187b9e1cd19917d2d4b9 100644 (file)
@@ -949,8 +949,8 @@ operand (expressionS *expressionP, enum expr_mode mode)
       if (md_need_index_operator())
        goto de_fault;
 # endif
-      /* FALLTHROUGH */
 #endif
+      /* Fall through.  */
     case '(':
       /* Didn't begin with digit & not a name.  */
       segment = expr (0, expressionP, mode);
@@ -980,8 +980,8 @@ operand (expressionS *expressionP, enum expr_mode mode)
       if (! flag_m68k_mri || *input_line_pointer != '\'')
        goto de_fault;
       ++input_line_pointer;
-      /* Fall through.  */
 #endif
+      /* Fall through.  */
     case '\'':
       if (! flag_m68k_mri)
        {
@@ -1002,8 +1002,8 @@ operand (expressionS *expressionP, enum expr_mode mode)
       /* Double quote is the bitwise not operator in MRI mode.  */
       if (! flag_m68k_mri)
        goto de_fault;
-      /* Fall through.  */
 #endif
+      /* Fall through.  */
     case '~':
       /* '~' is permitted to start a label on the Delta.  */
       if (is_name_beginner (c))
This page took 0.028305 seconds and 4 git commands to generate.