aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/init.c
diff options
context:
space:
mode:
authorMark Mitchell <mmitchel@gcc.gnu.org>1998-06-07 12:13:54 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>1998-06-07 12:13:54 +0000
commit874503bcad9c38fb673b43bcdc09e6d4658fe62a (patch)
tree6c03d69c022263d9aa94cd9a9e6ae9a38cde6cfb /gcc/cp/init.c
parentdfdfa60f540afcfb54a599ce9a59770225d11ce6 (diff)
downloadgcc-874503bcad9c38fb673b43bcdc09e6d4658fe62a.zip
gcc-874503bcad9c38fb673b43bcdc09e6d4658fe62a.tar.gz
gcc-874503bcad9c38fb673b43bcdc09e6d4658fe62a.tar.bz2
class.c (instantiate_type): Handle pointer-to-members where the member is a template.
* class.c (instantiate_type): Handle pointer-to-members where the member is a template. * init.c (build_offset_ref): Likewise. * typeck.c (build_unary_op): Likewise. From-SVN: r20269
Diffstat (limited to 'gcc/cp/init.c')
-rw-r--r--gcc/cp/init.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/cp/init.c b/gcc/cp/init.c
index 4eca6b6..b7b74c0 100644
--- a/gcc/cp/init.c
+++ b/gcc/cp/init.c
@@ -1615,14 +1615,15 @@ build_offset_ref (type, name)
int dtor = 0;
/* class templates can come in as TEMPLATE_DECLs here. */
- if (TREE_CODE (name) != IDENTIFIER_NODE)
+ if (TREE_CODE (name) == TEMPLATE_DECL)
return name;
if (type == std_node)
return do_scoped_id (name, 0);
- if (processing_template_decl || uses_template_parms (type))
- return build_min_nt (SCOPE_REF, type, name);
+ if (processing_template_decl || uses_template_parms (type)
+ || TREE_CODE (name) == TEMPLATE_ID_EXPR)
+ return build_min (SCOPE_REF, unknown_type_node, type, name);
/* Handle namespace names fully here. */
if (TREE_CODE (type) == NAMESPACE_DECL)