summaryrefslogtreecommitdiff
path: root/gcc/cp/decl.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/decl.c')
-rw-r--r--gcc/cp/decl.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index b03ea62a2ed..a8ec398e1ff 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -9695,7 +9695,8 @@ xref_tag (enum tag_types tag_code, tree name,
&& CLASSTYPE_IS_TEMPLATE (t))
{
error ("redeclaration of %qT as a non-template", t);
- t = error_mark_node;
+ error ("previous declaration %q+D", t);
+ POP_TIMEVAR_AND_RETURN (TV_NAME_LOOKUP, error_mark_node);
}
/* Make injected friend class visible. */