summaryrefslogtreecommitdiff
path: root/gcc/cp/rtti.c
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2002-12-19 17:16:26 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2002-12-19 17:16:26 +0000
commite657e37cec7eef18fa89712083ad48c76a10fab6 (patch)
treec90067e66827d3f202e02db04548102a5067ac8c /gcc/cp/rtti.c
parente433ac65859384c3d7fef182a1a4dda5f3446d33 (diff)
downloadgcc-e657e37cec7eef18fa89712083ad48c76a10fab6.tar.gz
Handle anonymous unions at the tree level.
C++ ABI change: Mangle anonymous unions using the name of their first named field (by depth-first search). Should not cause binary compatibility problems, though, as the compiler previously didn't emit anything for affected unions. * cp-tree.def (ALIAS_DECL): New tree code. * decl2.c (build_anon_union_vars): Build ALIAS_DECLs. Return the first field, not the largest. (finish_anon_union): Don't mess with RTL. Do set DECL_ASSEMBLER_NAME, push the decl, and write it out at namespace scope. * decl.c (lookup_name_real): See through an ALIAS_DECL. (pushdecl): Add namespace bindings for ALIAS_DECLs. * rtti.c (unemitted_tinfo_decl_p): Don't try to look at the name of a decl which doesn't have one. * typeck.c (build_class_member_access_expr): Don't recurse if we already have the type we want. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@60314 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/rtti.c')
-rw-r--r--gcc/cp/rtti.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/cp/rtti.c b/gcc/cp/rtti.c
index d8041ab53e4..495e0d4576a 100644
--- a/gcc/cp/rtti.c
+++ b/gcc/cp/rtti.c
@@ -1444,7 +1444,9 @@ unemitted_tinfo_decl_p (t, data)
{
if (/* It's a var decl */
TREE_CODE (t) == VAR_DECL
- /* whos name points back to itself */
+ /* which has a name */
+ && DECL_NAME (t)
+ /* whose name points back to itself */
&& IDENTIFIER_GLOBAL_VALUE (DECL_NAME (t)) == t
/* whose name's type is non-null */
&& TREE_TYPE (DECL_NAME (t))