diff options
author | Nathan Sidwell <nathan@codesourcery.com> | 2001-06-01 11:57:35 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@gcc.gnu.org> | 2001-06-01 11:57:35 +0000 |
commit | e5410b32112c69d305c5f377225d4e71c83f31c8 (patch) | |
tree | 623386ffc81e16d35ca5b1888a1e86ed854ca4d5 /gcc/cp/decl2.c | |
parent | feb48bde314eefc11a5de647ab316e4598c713e8 (diff) | |
download | gcc-e5410b32112c69d305c5f377225d4e71c83f31c8.zip gcc-e5410b32112c69d305c5f377225d4e71c83f31c8.tar.gz gcc-e5410b32112c69d305c5f377225d4e71c83f31c8.tar.bz2 |
Amend previous changelog PR g++/2936 Part missed from first commit
Amend previous changelog
PR g++/2936
Part missed from first commit
* decl2.c (finish_anon_union): Copy context.
From-SVN: r42777
Diffstat (limited to 'gcc/cp/decl2.c')
-rw-r--r-- | gcc/cp/decl2.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index 0245bc0..3dac866 100644 --- a/gcc/cp/decl2.c +++ b/gcc/cp/decl2.c @@ -2113,6 +2113,9 @@ finish_anon_union (anon_union_decl) int static_p = TREE_STATIC (anon_union_decl); int external_p = DECL_EXTERNAL (anon_union_decl); + /* The VAR_DECL's context is the same as the TYPE's context. */ + DECL_CONTEXT (anon_union_decl) = DECL_CONTEXT (TYPE_NAME (type)); + if (TYPE_FIELDS (type) == NULL_TREE) return; |