diff mbox

[2/3] Fix spurious semicolons

Message ID 1430265776-8157-2-git-send-email-dmalcolm@redhat.com
State New
Headers show

Commit Message

David Malcolm April 29, 2015, 12:02 a.m. UTC
An earlier version of the -Wmisleading-indentation patch issued
warnings for spurious trailing semicolons guarded by a conditional.

Although the latest version of -Wmisleading-indentation no longer
warns about these, I fixed the ones that were reported, thusly.

gcc/ChangeLog:
	* builtins.c (fold_builtin_1): Remove spurious second
	semicolon.
	* cgraph.h (symtab_node::get_availability): Likewise.
	* opts.c (common_handle_option): Remove spurious second semicolon.
	* tree-ssa-loop-ivopts.c (extract_cond_operands): Likewise.
	* tree-ssa-loop-niter.c (derive_constant_upper_bound_ops): Likewise.

gcc/cp/ChangeLog:
	* cp-tree.h (ARGUMENT_PACK_SELECT_ARG): Remove spurious
	trailing semicolon.

gcc/fortran/ChangeLog:
	* options.c (gfc_init_options): Remove spurious second
	semicolon.
	* trans-stmt.c (gfc_trans_allocate): Likewise.
---
 gcc/builtins.c             | 2 +-
 gcc/cgraph.h               | 2 +-
 gcc/cp/cp-tree.h           | 2 +-
 gcc/fortran/options.c      | 2 +-
 gcc/fortran/trans-stmt.c   | 2 +-
 gcc/opts.c                 | 2 +-
 gcc/tree-ssa-loop-ivopts.c | 4 ++--
 gcc/tree-ssa-loop-niter.c  | 2 +-
 8 files changed, 9 insertions(+), 9 deletions(-)

Comments

Jeff Law April 28, 2015, 11:53 p.m. UTC | #1
On 04/28/2015 06:02 PM, David Malcolm wrote:
> An earlier version of the -Wmisleading-indentation patch issued
> warnings for spurious trailing semicolons guarded by a conditional.
>
> Although the latest version of -Wmisleading-indentation no longer
> warns about these, I fixed the ones that were reported, thusly.
>
> gcc/ChangeLog:
> 	* builtins.c (fold_builtin_1): Remove spurious second
> 	semicolon.
> 	* cgraph.h (symtab_node::get_availability): Likewise.
> 	* opts.c (common_handle_option): Remove spurious second semicolon.
> 	* tree-ssa-loop-ivopts.c (extract_cond_operands): Likewise.
> 	* tree-ssa-loop-niter.c (derive_constant_upper_bound_ops): Likewise.
>
> gcc/cp/ChangeLog:
> 	* cp-tree.h (ARGUMENT_PACK_SELECT_ARG): Remove spurious
> 	trailing semicolon.
>
> gcc/fortran/ChangeLog:
> 	* options.c (gfc_init_options): Remove spurious second
> 	semicolon.
> 	* trans-stmt.c (gfc_trans_allocate): Likewise.
This falls under the obvious rule :-)

Please install.

jeff
diff mbox

Patch

diff --git a/gcc/builtins.c b/gcc/builtins.c
index 9263777..a05979a 100644
--- a/gcc/builtins.c
+++ b/gcc/builtins.c
@@ -9966,7 +9966,7 @@  fold_builtin_1 (location_t loc, tree fndecl, tree arg0)
     CASE_FLT_FN (BUILT_IN_CREAL):
       if (validate_arg (arg0, COMPLEX_TYPE)
 	&& TREE_CODE (TREE_TYPE (TREE_TYPE (arg0))) == REAL_TYPE)
-	return non_lvalue_loc (loc, fold_build1_loc (loc, REALPART_EXPR, type, arg0));;
+	return non_lvalue_loc (loc, fold_build1_loc (loc, REALPART_EXPR, type, arg0));
     break;
 
     CASE_FLT_FN (BUILT_IN_CIMAG):
diff --git a/gcc/cgraph.h b/gcc/cgraph.h
index 29f65a8..108cc80 100644
--- a/gcc/cgraph.h
+++ b/gcc/cgraph.h
@@ -2992,7 +2992,7 @@  symtab_node::get_availability (void)
   if (is_a <cgraph_node *> (this))
     return dyn_cast <cgraph_node *> (this)->get_availability ();
   else
-    return dyn_cast <varpool_node *> (this)->get_availability ();;
+    return dyn_cast <varpool_node *> (this)->get_availability ();
 }
 
 /* Call calback on symtab node and aliases associated to this node.
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index 2a904a5..ed2b354 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -3073,7 +3073,7 @@  extern void decl_shadowed_for_var_insert (tree, tree);
    ARGUMENT_PACK_SELECT represents. */
 #define ARGUMENT_PACK_SELECT_ARG(NODE)					\
   TREE_VEC_ELT (ARGUMENT_PACK_ARGS (ARGUMENT_PACK_SELECT_FROM_PACK (NODE)), \
-	        ARGUMENT_PACK_SELECT_INDEX (NODE));
+	        ARGUMENT_PACK_SELECT_INDEX (NODE))
 
 /* In a FUNCTION_DECL, the saved language-specific per-function data.  */
 #define DECL_SAVED_FUNCTION_DATA(NODE)			\
diff --git a/gcc/fortran/options.c b/gcc/fortran/options.c
index 1262ccc..5a35803 100644
--- a/gcc/fortran/options.c
+++ b/gcc/fortran/options.c
@@ -115,7 +115,7 @@  gfc_init_options (unsigned int decoded_options_count,
      enabled by default in Fortran.  Ideally, we should express this
      in .opt, but that is not supported yet.  */
   if (!global_options_set.x_cpp_warn_missing_include_dirs)
-    global_options.x_cpp_warn_missing_include_dirs = 1;;
+    global_options.x_cpp_warn_missing_include_dirs = 1;
 
   set_default_std_flags ();
 
diff --git a/gcc/fortran/trans-stmt.c b/gcc/fortran/trans-stmt.c
index 91d2a85..64ea0b5 100644
--- a/gcc/fortran/trans-stmt.c
+++ b/gcc/fortran/trans-stmt.c
@@ -5478,7 +5478,7 @@  gfc_trans_allocate (gfc_code * code)
 	    memsz = TYPE_SIZE_UNIT (gfc_typenode_for_spec (&code->ext.alloc.ts));
 	  else
 	    /* Handle size computation of the type declared to alloc.  */
-	    memsz = TYPE_SIZE_UNIT (TREE_TYPE (TREE_TYPE (se.expr)));;
+	    memsz = TYPE_SIZE_UNIT (TREE_TYPE (TREE_TYPE (se.expr)));
 
 	  /* Allocate - for non-pointers with re-alloc checking.  */
 	  if (gfc_expr_attr (expr).allocatable)
diff --git a/gcc/opts.c b/gcc/opts.c
index 39c190d..fed5d12 100644
--- a/gcc/opts.c
+++ b/gcc/opts.c
@@ -1386,7 +1386,7 @@  common_handle_option (struct gcc_options *opts,
 	unsigned int i;
 
 	if (lang_mask == CL_DRIVER)
-	  break;;
+	  break;
 
 	undoc_mask = ((opts->x_verbose_flag | opts->x_extra_warnings)
 		      ? 0
diff --git a/gcc/tree-ssa-loop-ivopts.c b/gcc/tree-ssa-loop-ivopts.c
index d71e3a4..44219d2 100644
--- a/gcc/tree-ssa-loop-ivopts.c
+++ b/gcc/tree-ssa-loop-ivopts.c
@@ -1481,9 +1481,9 @@  extract_cond_operands (struct ivopts_data *data, gimple stmt,
 
 end:
   if (control_var)
-    *control_var = op0;;
+    *control_var = op0;
   if (iv_var)
-    *iv_var = iv0;;
+    *iv_var = iv0;
   if (bound)
     *bound = op1;
   if (iv_bound)
diff --git a/gcc/tree-ssa-loop-niter.c b/gcc/tree-ssa-loop-niter.c
index fc63825..042f8df 100644
--- a/gcc/tree-ssa-loop-niter.c
+++ b/gcc/tree-ssa-loop-niter.c
@@ -2565,7 +2565,7 @@  derive_constant_upper_bound_ops (tree type, tree op0,
 	  cst = -cst;
 	  /* Avoid CST == 0x80000...  */
 	  if (wi::neg_p (cst))
-	    return max;;
+	    return max;
 
 	  /* OP0 + CST.  We need to check that
 	     BND <= MAX (type) - CST.  */