Commit ab0bc602 by Paolo Carlini Committed by Paolo Carlini

cp-tree.h (finish_stmt): Do not declare.

2013-08-02  Paolo Carlini  <paolo.carlini@oracle.com>

	* cp-tree.h (finish_stmt): Do not declare.
	* decl.c (finish_stmt): Do not define.
	* parser.c (cp_parser_expression_statement,
	cp_parser_declaration_statement,
	cp_parser_transaction_cancel): Don't call finish_stmt.
	* semantics.c (finish_expr_stmt, finish_if_stmt,
	finish_while_stmt, finish_do_stmt, finish_return_stmt,
	finish_for_stmt, finish_switch_stmt, finish_compound_stmt,
	finish_transaction_stmt): Likewise.

From-SVN: r201427
parent 7dec245a
2013-08-02 Paolo Carlini <paolo.carlini@oracle.com>
* cp-tree.h (finish_stmt): Do not declare.
* decl.c (finish_stmt): Do not define.
* parser.c (cp_parser_expression_statement,
cp_parser_declaration_statement,
cp_parser_transaction_cancel): Don't call finish_stmt.
* semantics.c (finish_expr_stmt, finish_if_stmt,
finish_while_stmt, finish_do_stmt, finish_return_stmt,
finish_for_stmt, finish_switch_stmt, finish_compound_stmt,
finish_transaction_stmt): Likewise.
2013-08-01 Fabien Chêne <fabien@gcc.gnu.org> 2013-08-01 Fabien Chêne <fabien@gcc.gnu.org>
PR c++/54537 PR c++/54537
......
...@@ -5217,7 +5217,6 @@ extern tree grokmethod (cp_decl_specifier_seq *, const cp_declarator *, tree) ...@@ -5217,7 +5217,6 @@ extern tree grokmethod (cp_decl_specifier_seq *, const cp_declarator *, tree)
extern void maybe_register_incomplete_var (tree); extern void maybe_register_incomplete_var (tree);
extern void maybe_commonize_var (tree); extern void maybe_commonize_var (tree);
extern void complete_vars (tree); extern void complete_vars (tree);
extern void finish_stmt (void);
extern tree static_fn_type (tree); extern tree static_fn_type (tree);
extern void revert_static_member_fn (tree); extern void revert_static_member_fn (tree);
extern void fixup_anonymous_aggr (tree); extern void fixup_anonymous_aggr (tree);
......
...@@ -14266,13 +14266,6 @@ cxx_maybe_build_cleanup (tree decl, tsubst_flags_t complain) ...@@ -14266,13 +14266,6 @@ cxx_maybe_build_cleanup (tree decl, tsubst_flags_t complain)
} }
/* When a stmt has been parsed, this function is called. */
void
finish_stmt (void)
{
}
/* Return the FUNCTION_TYPE that corresponds to MEMFNTYPE, which can be a /* Return the FUNCTION_TYPE that corresponds to MEMFNTYPE, which can be a
FUNCTION_DECL, METHOD_TYPE, FUNCTION_TYPE, pointer or reference to FUNCTION_DECL, METHOD_TYPE, FUNCTION_TYPE, pointer or reference to
METHOD_TYPE or FUNCTION_TYPE, or pointer to member function. */ METHOD_TYPE or FUNCTION_TYPE, or pointer to member function. */
......
...@@ -9419,8 +9419,6 @@ cp_parser_expression_statement (cp_parser* parser, tree in_statement_expr) ...@@ -9419,8 +9419,6 @@ cp_parser_expression_statement (cp_parser* parser, tree in_statement_expr)
statement = finish_stmt_expr_expr (statement, in_statement_expr); statement = finish_stmt_expr_expr (statement, in_statement_expr);
else if (statement) else if (statement)
statement = finish_expr_stmt (statement); statement = finish_expr_stmt (statement);
else
finish_stmt ();
return statement; return statement;
} }
...@@ -10472,9 +10470,6 @@ cp_parser_declaration_statement (cp_parser* parser) ...@@ -10472,9 +10470,6 @@ cp_parser_declaration_statement (cp_parser* parser)
/* Free any declarators allocated. */ /* Free any declarators allocated. */
obstack_free (&declarator_obstack, p); obstack_free (&declarator_obstack, p);
/* Finish off the statement. */
finish_stmt ();
} }
/* Some dependent statements (like `if (cond) statement'), are /* Some dependent statements (like `if (cond) statement'), are
...@@ -28609,7 +28604,6 @@ cp_parser_transaction_cancel (cp_parser *parser) ...@@ -28609,7 +28604,6 @@ cp_parser_transaction_cancel (cp_parser *parser)
stmt = build_tm_abort_call (token->location, is_outer); stmt = build_tm_abort_call (token->location, is_outer);
add_stmt (stmt); add_stmt (stmt);
finish_stmt ();
return stmt; return stmt;
} }
......
...@@ -641,8 +641,6 @@ finish_expr_stmt (tree expr) ...@@ -641,8 +641,6 @@ finish_expr_stmt (tree expr)
r = add_stmt (expr); r = add_stmt (expr);
} }
finish_stmt ();
return r; return r;
} }
...@@ -707,7 +705,6 @@ finish_if_stmt (tree if_stmt) ...@@ -707,7 +705,6 @@ finish_if_stmt (tree if_stmt)
tree scope = IF_SCOPE (if_stmt); tree scope = IF_SCOPE (if_stmt);
IF_SCOPE (if_stmt) = NULL; IF_SCOPE (if_stmt) = NULL;
add_stmt (do_poplevel (scope)); add_stmt (do_poplevel (scope));
finish_stmt ();
} }
/* Begin a while-statement. Returns a newly created WHILE_STMT if /* Begin a while-statement. Returns a newly created WHILE_STMT if
...@@ -740,7 +737,6 @@ void ...@@ -740,7 +737,6 @@ void
finish_while_stmt (tree while_stmt) finish_while_stmt (tree while_stmt)
{ {
WHILE_BODY (while_stmt) = do_poplevel (WHILE_BODY (while_stmt)); WHILE_BODY (while_stmt) = do_poplevel (WHILE_BODY (while_stmt));
finish_stmt ();
} }
/* Begin a do-statement. Returns a newly created DO_STMT if /* Begin a do-statement. Returns a newly created DO_STMT if
...@@ -778,7 +774,6 @@ finish_do_stmt (tree cond, tree do_stmt) ...@@ -778,7 +774,6 @@ finish_do_stmt (tree cond, tree do_stmt)
{ {
cond = maybe_convert_cond (cond); cond = maybe_convert_cond (cond);
DO_COND (do_stmt) = cond; DO_COND (do_stmt) = cond;
finish_stmt ();
} }
/* Finish a return-statement. The EXPRESSION returned, if any, is as /* Finish a return-statement. The EXPRESSION returned, if any, is as
...@@ -815,7 +810,6 @@ finish_return_stmt (tree expr) ...@@ -815,7 +810,6 @@ finish_return_stmt (tree expr)
TREE_NO_WARNING (r) |= no_warning; TREE_NO_WARNING (r) |= no_warning;
r = maybe_cleanup_point_expr_void (r); r = maybe_cleanup_point_expr_void (r);
r = add_stmt (r); r = add_stmt (r);
finish_stmt ();
return r; return r;
} }
...@@ -941,8 +935,6 @@ finish_for_stmt (tree for_stmt) ...@@ -941,8 +935,6 @@ finish_for_stmt (tree for_stmt)
*scope_ptr = NULL; *scope_ptr = NULL;
add_stmt (do_poplevel (scope)); add_stmt (do_poplevel (scope));
} }
finish_stmt ();
} }
/* Begin a range-for-statement. Returns a new RANGE_FOR_STMT. /* Begin a range-for-statement. Returns a new RANGE_FOR_STMT.
...@@ -1076,7 +1068,6 @@ finish_switch_stmt (tree switch_stmt) ...@@ -1076,7 +1068,6 @@ finish_switch_stmt (tree switch_stmt)
SWITCH_STMT_BODY (switch_stmt) = SWITCH_STMT_BODY (switch_stmt) =
pop_stmt_list (SWITCH_STMT_BODY (switch_stmt)); pop_stmt_list (SWITCH_STMT_BODY (switch_stmt));
pop_switch (); pop_switch ();
finish_stmt ();
scope = SWITCH_STMT_SCOPE (switch_stmt); scope = SWITCH_STMT_SCOPE (switch_stmt);
SWITCH_STMT_SCOPE (switch_stmt) = NULL; SWITCH_STMT_SCOPE (switch_stmt) = NULL;
...@@ -1298,7 +1289,6 @@ finish_compound_stmt (tree stmt) ...@@ -1298,7 +1289,6 @@ finish_compound_stmt (tree stmt)
/* ??? See c_end_compound_stmt wrt statement expressions. */ /* ??? See c_end_compound_stmt wrt statement expressions. */
add_stmt (stmt); add_stmt (stmt);
finish_stmt ();
} }
/* Finish an asm-statement, whose components are a STRING, some /* Finish an asm-statement, whose components are a STRING, some
...@@ -5208,7 +5198,6 @@ finish_transaction_stmt (tree stmt, tree compound_stmt, int flags, tree noex) ...@@ -5208,7 +5198,6 @@ finish_transaction_stmt (tree stmt, tree compound_stmt, int flags, tree noex)
if (compound_stmt) if (compound_stmt)
finish_compound_stmt (compound_stmt); finish_compound_stmt (compound_stmt);
finish_stmt ();
} }
/* Build a __transaction_atomic or __transaction_relaxed expression. If /* Build a __transaction_atomic or __transaction_relaxed expression. If
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment