aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2000-01-19 09:04:41 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>2000-01-19 09:04:41 +0000
commit301e21af2c964ac3f7505d5bf9a45d2fe812ff29 (patch)
tree09551cf3747015299663f08b923643d0eeba0790 /gcc/cp
parent1455913a0b38a73b156bb57b3b7275508ead09d3 (diff)
downloadgcc-301e21af2c964ac3f7505d5bf9a45d2fe812ff29.zip
gcc-301e21af2c964ac3f7505d5bf9a45d2fe812ff29.tar.gz
gcc-301e21af2c964ac3f7505d5bf9a45d2fe812ff29.tar.bz2
tree.c (bot_manip): Set DECL_CONTEXT for newly created VAR_DECLs.
* tree.c (bot_manip): Set DECL_CONTEXT for newly created VAR_DECLs. From-SVN: r31498
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/tree.c8
2 files changed, 11 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 5be6a0f..32daf4b 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+2000-01-19 Mark Mitchell <mark@codesourcery.com>
+
+ * tree.c (bot_manip): Set DECL_CONTEXT for newly created
+ VAR_DECLs.
+
2000-01-18 Nathan Sidwell <sidwell@codesourcery.com>
* cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c
index 3bf874a..432ec29 100644
--- a/gcc/cp/tree.c
+++ b/gcc/cp/tree.c
@@ -1560,9 +1560,13 @@ bot_manip (tp, walk_subtrees, data)
}
else
{
+ tree var;
+
u = copy_node (t);
- TREE_OPERAND (u, 0) = build (VAR_DECL, TREE_TYPE (t));
- layout_decl (TREE_OPERAND (u, 0), 0);
+ var = build (VAR_DECL, TREE_TYPE (t));
+ DECL_CONTEXT (var) = current_function_decl;
+ layout_decl (var, 0);
+ TREE_OPERAND (u, 0) = var;
}
/* Map the old variable to the new one. */