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:
Mark Mitchell 1998-08-03 09:58:34 +00:00
parent 9471ad135d
commit 35fce3ceb2
2 changed files with 13 additions and 2 deletions

View File

@ -1642,6 +1642,7 @@ 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);
if (!uses_template_parms (value))
DECL_ASSEMBLER_NAME (value) =
get_identifier (build_overload_name (TREE_TYPE (value), 1, 1));

View File

@ -0,0 +1,10 @@
// Build don't link:
template <int B>
class foo;
template <class U>
class bar
{
typedef foo<(U::id > 0)> foobar;
};