From: Nathan Sidwell Date: Fri, 1 Jun 2001 11:57:35 +0000 (+0000) Subject: Amend previous changelog PR g++/2936 Part missed from first commit X-Git-Tag: prereleases/libstdc++-3.0.95~4080 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e5410b32112c69d305c5f377225d4e71c83f31c8;p=thirdparty%2Fgcc.git 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 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index e78635c8e8bf..8f49fc685d50 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,7 +1,12 @@ +2001-06-01 Nathan Sidwell + + PR g++/2936 + Part missed from first commit + * decl2.c (finish_anon_union): Copy context. + 2001-05-30 Nathan Sidwell PR g++/2936 - * decl.c (finish_anon_union): Copy context. * optimize.c (remap_decl): Remap anonymous aggregate members too. 2001-05-26 Nathan Sidwell diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index 0245bc0755c9..3dac86679a03 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;