PR c++/28432
* decl2.c (check_classfn): Remove early return.
* search.c (lookup_member): Return NULL with bad type.
* g++.dg/other/pr28304.C: Change expected error message.
* g++.dg/other/pr28432.C: New test.
From-SVN: r115908
+2006-08-03 Steve Ellcey <sje@cup.hp.com>
+
+ PR c++/28432
+ * decl2.c (check_classfn): Remove early return.
+ * search.c (lookup_member): Return NULL with bad type.
+
2006-08-03 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c++/27508
{
error ("no %q#D member function declared in class %qT",
function, ctype);
- return NULL_TREE;
}
/* If we did not find the method in the class, add it to avoid
}
else
{
- gcc_assert (IS_AGGR_TYPE_CODE (TREE_CODE (xbasetype)));
+ if (!IS_AGGR_TYPE_CODE (TREE_CODE (xbasetype)))
+ return NULL_TREE;
type = xbasetype;
xbasetype = NULL_TREE;
}
+2006-08-03 Steve Ellcey <sje@cup.hp.com>
+
+ PR c++/28432
+ * g++.dg/other/pr28304.C: Change expected error message.
+ * g++.dg/other/pr28432.C: New test.
+
2006-08-03 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c++/28250
void bar()
{
- A::foo(1); // { dg-error "not a member" }
+ A::foo(1); // { dg-error "no matching function for call" }
}
--- /dev/null
+
+// Test to make sure we do not ICE on this invalid program.
+
+// { dg-options "" }
+
+struct A {};
+void A::foo(); // { dg-error "member function declared in class|outside of class is not definition" }