This is the mail archive of the binutils-cvs@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] -Wimplicit-fallthrough dodgy fixes


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=fcddde94ee566423cacf455a86e2e797b11d1cee

commit fcddde94ee566423cacf455a86e2e797b11d1cee
Author: Alan Modra <amodra@gmail.com>
Date:   Thu Oct 6 22:49:08 2016 +1030

    -Wimplicit-fallthrough dodgy fixes
    
    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.

Diff:
---
 gas/ChangeLog | 5 +++++
 gas/app.c     | 2 +-
 gas/expr.c    | 6 +++---
 3 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/gas/ChangeLog b/gas/ChangeLog
index 12f2e19..c88f70f 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -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
diff --git a/gas/app.c b/gas/app.c
index 4b53ce7..6b883a1 100644
--- 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)
diff --git a/gas/expr.c b/gas/expr.c
index b9983d8..1cdd081 100644
--- a/gas/expr.c
+++ b/gas/expr.c
@@ -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))


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]