Commit 61cd1234 by Mark Mitchell Committed by Mark Mitchell

* decl2.c (grokfield): Remangle the name of a member TYPE_DECL.

From-SVN: r19369
parent 1701f21e
......@@ -5,6 +5,8 @@ Tue Apr 21 22:00:04 1998 Mark Mitchell <mmitchell@usa.net>
* decl2.c (check_member_template): Set DECL_IGNORED for member
class templates, too.
* decl2.c (grokfield): Remangle the name of a member TYPE_DECL.
Tue Apr 21 18:59:11 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
* decl.c (duplicate_decls): Only check DECL_FRIEND_P if function.
......
......@@ -1579,6 +1579,12 @@ grokfield (declarator, declspecs, init, asmspec_tree, attrlist)
DECL_CLASS_CONTEXT (value) = current_class_type;
CLASSTYPE_LOCAL_TYPEDECLS (current_class_type) = 1;
/* Now that we've updated the context, we need to remangle the
name for this TYPE_DECL. */
DECL_ASSEMBLER_NAME (value) = DECL_NAME (value);
DECL_ASSEMBLER_NAME (value) =
get_identifier (build_overload_name (TREE_TYPE (value), 1, 1));
pushdecl_class_level (value);
return value;
}
......
// Build don't link:
template <class T>
void f(T, T)
{
}
struct A {
typedef enum {
VAL1
} result_t;
};
struct B {
typedef enum {
VAL2
} result_t;
};
void g()
{
f(A::VAL1, A::VAL1);
f(B::VAL2, B::VAL2);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment