PR c++/28304
* decl2.c (check_classfn): Return NULL_TREE on error.
* g++.dg/other/pr28304.C: New test.
From-SVN: r115563
+2006-07-18 Steve Ellcey <sje@cup.hp.com>
+
+ PR c++/28304
+ * decl2.c (check_classfn): Return NULL_TREE on error.
+
2006-07-17 Lee Millward <lee.millward@gmail.com>
PR c++/28051
else if (!COMPLETE_TYPE_P (ctype))
cxx_incomplete_type_error (function, ctype);
else
- error ("no %q#D member function declared in class %qT",
- function, ctype);
+ {
+ 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
spurious errors (unless the CTYPE is not yet defined, in which
+2006-07-18 Steve Ellcey <sje@cup.hp.com>
+
+ PR c++/28304
+ * g++.dg/other/pr28304.C: New test.
+
2006-07-18 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c/28286
--- /dev/null
+
+// Test to make sure we do not ICE on this invalid program.
+
+struct A {};
+
+template<typename T> void A::foo(T) {} // { dg-error "" }
+
+void bar()
+{
+ A::foo(1); // { dg-error "not a member" }
+}