PR c++/28710
* decl.c (xref_tag): Improve error message. Return early on error.
* g++.dg/template/redecl4.C: New test.
From-SVN: r116211
2006-08-17 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
+ PR c++/28710
+ * decl.c (xref_tag): Improve error message. Return early on error.
+
PR c++/28711
* pt.c (tsubst_copy_and_build) <case CONSTRUCTOR>: Robustify.
&& 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. */
2006-08-17 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
+ PR c++/28710
+ * g++.dg/template/redecl4.C: New test.
+
PR c++/28711
* g++.dg/template/ctor8.C: New test.
--- /dev/null
+// PR c++/28710
+// { dg-do compile }
+
+template<int> union A; // { dg-error "previous" }
+struct A; // { dg-error "non-template" }