diff options
Diffstat (limited to 'gcc/cp/decl2.c')
| -rw-r--r-- | gcc/cp/decl2.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index 8243cb1..7ed490e 100644 --- a/gcc/cp/decl2.c +++ b/gcc/cp/decl2.c @@ -65,7 +65,6 @@ typedef struct priority_info_s { static void mark_vtable_entries (tree); static bool maybe_emit_vtables (tree); -static tree build_anon_union_vars (tree); static bool acceptable_java_type (tree); static tree start_objects (int, int); static void finish_objects (int, int, tree); @@ -1072,14 +1071,13 @@ cplus_decl_attributes (tree *decl, tree attributes, int flags) SET_IDENTIFIER_TYPE_VALUE (DECL_NAME (*decl), TREE_TYPE (*decl)); } -/* Walks through the namespace- or function-scope anonymous union OBJECT, - building appropriate ALIAS_DECLs. Returns one of the fields for use in - the mangled name. */ +/* Walks through the namespace- or function-scope anonymous union + OBJECT, with the indicated TYPE, building appropriate ALIAS_DECLs. + Returns one of the fields for use in the mangled name. */ static tree -build_anon_union_vars (tree object) +build_anon_union_vars (tree type, tree object) { - tree type = TREE_TYPE (object); tree main_decl = NULL_TREE; tree field; @@ -1127,7 +1125,7 @@ build_anon_union_vars (tree object) decl = pushdecl (decl); } else if (ANON_AGGR_TYPE_P (TREE_TYPE (field))) - decl = build_anon_union_vars (ref); + decl = build_anon_union_vars (TREE_TYPE (field), ref); else decl = 0; @@ -1167,7 +1165,7 @@ finish_anon_union (tree anon_union_decl) return; } - main_decl = build_anon_union_vars (anon_union_decl); + main_decl = build_anon_union_vars (type, anon_union_decl); if (main_decl == NULL_TREE) { warning ("anonymous union with no members"); |
