aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/decl.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/decl.c')
-rw-r--r--gcc/cp/decl.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index f4651db..f8202b4 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -10249,6 +10249,15 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
case BASELINK:
next = &BASELINK_FUNCTIONS (decl);
break;
+
+ case TEMPLATE_DECL:
+ /* Sometimes, we see a template-name used as part of a
+ decl-specifier like in
+ std::allocator alloc;
+ Handle that gracefully. */
+ error ("invalid use of template-name '%E' in a declarator", decl);
+ return error_mark_node;
+ break;
default:
my_friendly_assert (0, 20020917);