decl2.c (grokfield): Don't mangle the name of a TYPE_DECL is it uses template parameters.
* decl2.c (grokfield): Don't mangle the name of a TYPE_DECL is it uses template parameters. From-SVN: r21548
This commit is contained in:
parent
9471ad135d
commit
35fce3ceb2
|
@ -1642,8 +1642,9 @@ grokfield (declarator, declspecs, init, asmspec_tree, attrlist)
|
|||
/* 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));
|
||||
if (!uses_template_parms (value))
|
||||
DECL_ASSEMBLER_NAME (value) =
|
||||
get_identifier (build_overload_name (TREE_TYPE (value), 1, 1));
|
||||
|
||||
pushdecl_class_level (value);
|
||||
return value;
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
// Build don't link:
|
||||
|
||||
template <int B>
|
||||
class foo;
|
||||
|
||||
template <class U>
|
||||
class bar
|
||||
{
|
||||
typedef foo<(U::id > 0)> foobar;
|
||||
};
|
Loading…
Reference in New Issue