From b0832fe1f38ce3553cb4d3b91b4821565c9d0d36 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Fri, 4 Jan 2002 22:03:20 +0100 Subject: tree.h (expand_expr_stmt_value): Add maybe_last argument. * tree.h (expand_expr_stmt_value): Add maybe_last argument. * c-common.h (genrtl_expr_stmt_value): Likewise. * stmt.c (expand_expr_stmt): Pass 1 as maybe_last. (expand_expr_stmt_value): Add maybe_last argument. Don't warn about statement with no effect if it is the last statement in expression statement. * c-semantics.c (genrtl_expr_stmt): Pass 1 as maybe_last. (genrtl_expr_stmt_value): Add maybe_last argument, pass it down to expand_expr_stmt_value. (expand_stmt) [EXPR_STMT]: Pass 1 as maybe_last to genrtl_expr_stmt_value if t is the last EXPR_STMT in its scope. * expr.c (expand_expr) [LABELED_BLOCK_EXPR, LOOP_EXPR]: Pass 1 as maybe_last to expand_expr_stmt_value. * gcc.dg/20020104-1.c: New test. From-SVN: r48541 --- gcc/c-common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/c-common.h') diff --git a/gcc/c-common.h b/gcc/c-common.h index 296c9af..873021b 100644 --- a/gcc/c-common.h +++ b/gcc/c-common.h @@ -721,7 +721,7 @@ extern void add_c_tree_codes PARAMS ((void)); extern void genrtl_do_pushlevel PARAMS ((void)); extern void genrtl_goto_stmt PARAMS ((tree)); extern void genrtl_expr_stmt PARAMS ((tree)); -extern void genrtl_expr_stmt_value PARAMS ((tree, int)); +extern void genrtl_expr_stmt_value PARAMS ((tree, int, int)); extern void genrtl_decl_stmt PARAMS ((tree)); extern void genrtl_if_stmt PARAMS ((tree)); extern void genrtl_while_stmt PARAMS ((tree)); -- cgit v1.1