summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>1999-06-04 03:45:57 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>1999-06-04 03:45:57 +0000
commitbaa3b2c375660339f38f7d3e76e32cfdf6f2f2b4 (patch)
tree10cb2db90600322a90dace39bf5c5919a11c40c1
parent461e0ce63667dbf95c16b62a0d7fd5ada3a302c0 (diff)
downloadppe42-gcc-baa3b2c375660339f38f7d3e76e32cfdf6f2f2b4.tar.gz
ppe42-gcc-baa3b2c375660339f38f7d3e76e32cfdf6f2f2b4.zip
* semantics.c (finish_if_stmt_cond): Copy cond to permanent_obstack.
(finish_while_stmt_cond, finish_do_stmt, finish_for_cond): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@27348 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/semantics.c8
2 files changed, 9 insertions, 4 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index d59db6bf0fa..a8027ba6941 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+1999-06-04 Jason Merrill <jason@yorick.cygnus.com>
+
+ * semantics.c (finish_if_stmt_cond): Copy cond to permanent_obstack.
+ (finish_while_stmt_cond, finish_do_stmt, finish_for_cond): Likewise.
+
1999-06-04 Nathan Sidwell <nathan@acm.org>
* except.c (build_throw): Check throw expression validity.
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index 37fb9da07d2..ee6b99b3f20 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -120,7 +120,7 @@ finish_if_stmt_cond (cond, if_stmt)
if (last_tree != if_stmt)
RECHAIN_STMTS_FROM_LAST (if_stmt, IF_COND (if_stmt));
else
- IF_COND (if_stmt) = cond;
+ IF_COND (if_stmt) = copy_to_permanent (cond);
}
else
{
@@ -219,7 +219,7 @@ finish_while_stmt_cond (cond, while_stmt)
RECHAIN_STMTS_FROM_LAST (while_stmt,
WHILE_COND (while_stmt));
else
- TREE_OPERAND (while_stmt, 0) = cond;
+ TREE_OPERAND (while_stmt, 0) = copy_to_permanent (cond);
}
else
{
@@ -294,7 +294,7 @@ finish_do_stmt (cond, do_stmt)
tree do_stmt;
{
if (processing_template_decl)
- DO_COND (do_stmt) = cond;
+ DO_COND (do_stmt) = copy_to_permanent (cond);
else
{
emit_line_note (input_filename, lineno);
@@ -378,7 +378,7 @@ finish_for_cond (cond, for_stmt)
if (last_tree != for_stmt)
RECHAIN_STMTS_FROM_LAST (for_stmt, FOR_COND (for_stmt));
else
- FOR_COND (for_stmt) = cond;
+ FOR_COND (for_stmt) = copy_to_permanent (cond);
}
else
{
OpenPOWER on IntegriCloud