* method.c (locate_copy): Check for non_reference
returning error_mark_node.
PR c++/28260
* decl.c (duplicate_decls): Return error_mark_node
on ambiguous declaration.
PR c++/28258
* g++/dg/other/error13.C: New test.
PR c++/28260
* g++.dg/template/friend44.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@115561
138bc75d-0d04-0410-961f-
82ee72b054a4
+2006-07-18 Lee Millward <lee.millward@gmail.com>
+
+ PR c++/28258
+ * method.c (locate_copy): Check for non_reference
+ returning error_mark_node.
+
+ PR c++/28260
+ * decl.c (duplicate_decls): Return error_mark_node
+ on ambiguous declaration.
+
2006-07-18 Steve Ellcey <sje@cup.hp.com>
PR c++/27495
{
error ("new declaration %q#D", newdecl);
error ("ambiguates old declaration %q+#D", olddecl);
+ return error_mark_node;
}
else
return NULL_TREE;
if (!parms)
continue;
src_type = non_reference (TREE_VALUE (parms));
+
+ if (src_type == error_mark_node)
+ return NULL_TREE;
+
if (!same_type_ignoring_top_level_qualifiers_p (src_type, type))
continue;
if (!sufficient_parms_p (TREE_CHAIN (parms)))
+2006-07-18 Lee Millward <lee.millward@gmail.com>
+
+ PR c++/28258
+ * g++/dg/other/error13.C: New test.
+
+ PR c++/28260
+ * g++.dg/template/friend44.C: New test.
+
2006-07-18 Steve Ellcey <sje@cup.hp.com>
PR c++/27495
--- /dev/null
+//PR c++/28258
+
+struct A
+{ // { dg-error "" }
+ A(void x); // { dg-error "invalid use|incomplete type|candidates" }
+};
+
+struct B : A {}; // { dg-error "no matching function for call" }
+
+B b; // { dg-error "synthesized method" }
--- /dev/null
+//PR c++/28260
+
+template<int> struct A
+{
+ friend int foo(); // { dg-error "new declaration" }
+};
+
+void foo() { A<0> a; } // { dg-error "ambiguates old declaration" }