summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgeoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4>2003-05-02 18:07:01 +0000
committergeoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4>2003-05-02 18:07:01 +0000
commit948630cce1cc9af0957bd46629f9eeee8c59254f (patch)
tree992bf85b2fbfa8e60dad749a0593646f3ce2501b
parent29b9a35e89958ce6543ffc036d23e1a3589275d3 (diff)
downloadgcc-948630cce1cc9af0957bd46629f9eeee8c59254f.tar.gz
* c-semantics.c (genrtl_switch_stmt, genrtl_if_stmt): Call
expand_stmt on result of expand_unreachable_stmt. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@66392 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/c-semantics.c15
2 files changed, 13 insertions, 7 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 9c43843f3f8..88e3f7dee26 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2003-05-02 Geoffrey Keating <geoffk@apple.com>
+
+ * c-semantics.c (genrtl_switch_stmt, genrtl_if_stmt): Call
+ expand_stmt on result of expand_unreachable_stmt.
+
2003-05-02 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
* doc/contrib.texi (Contributors): Add Daniel Berlin.
diff --git a/gcc/c-semantics.c b/gcc/c-semantics.c
index 19ea48ebd12..522d56322b3 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));
}