aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-semantics.c
diff options
context:
space:
mode:
authorGeoffrey Keating <geoffk@apple.com>2003-05-02 18:07:01 +0000
committerGeoffrey Keating <geoffk@gcc.gnu.org>2003-05-02 18:07:01 +0000
commit7454096f706828364fc50756a67df3a6269482ac (patch)
tree992bf85b2fbfa8e60dad749a0593646f3ce2501b /gcc/c-semantics.c
parent96c4a002318730e8d1dbc206fa8bf09733a6b33b (diff)
downloadgcc-7454096f706828364fc50756a67df3a6269482ac.zip
gcc-7454096f706828364fc50756a67df3a6269482ac.tar.gz
gcc-7454096f706828364fc50756a67df3a6269482ac.tar.bz2
c-semantics.c (genrtl_switch_stmt, [...]): Call expand_stmt on result of expand_unreachable_stmt.
* c-semantics.c (genrtl_switch_stmt, genrtl_if_stmt): Call expand_stmt on result of expand_unreachable_stmt. From-SVN: r66392
Diffstat (limited to 'gcc/c-semantics.c')
-rw-r--r--gcc/c-semantics.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/gcc/c-semantics.c b/gcc/c-semantics.c
index 19ea48e..522d563 100644
--- a/gcc/c-semantics.c
+++ b/gcc/c-semantics.c
@@ -416,19 +416,20 @@ genrtl_if_stmt (t)
expand_start_cond (cond, 0);
if (THEN_CLAUSE (t))
{
+ tree nextt = THEN_CLAUSE (t);
+
if (cond && integer_zerop (cond))
- expand_unreachable_stmt (THEN_CLAUSE (t), warn_notreached);
- else
- expand_stmt (THEN_CLAUSE (t));
+ nextt = expand_unreachable_stmt (nextt, warn_notreached);
+ expand_stmt (nextt);
}
if (ELSE_CLAUSE (t))
{
+ tree nextt = ELSE_CLAUSE (t);
expand_start_else ();
if (cond && integer_nonzerop (cond))
- expand_unreachable_stmt (ELSE_CLAUSE (t), warn_notreached);
- else
- expand_stmt (ELSE_CLAUSE (t));
+ nextt = expand_unreachable_stmt (nextt, warn_notreached);
+ expand_stmt (nextt);
}
expand_end_cond ();
}
@@ -687,7 +688,7 @@ genrtl_switch_stmt (t)
emit_line_note (input_filename, input_line);
expand_start_case (1, cond, TREE_TYPE (cond), "switch statement");
- expand_unreachable_stmt (SWITCH_BODY (t), warn_notreached);
+ expand_stmt (expand_unreachable_stmt (SWITCH_BODY (t), warn_notreached));
expand_end_case_type (cond, SWITCH_TYPE (t));
}