summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsje <sje@138bc75d-0d04-0410-961f-82ee72b054a4>2006-07-17 15:21:42 +0000
committersje <sje@138bc75d-0d04-0410-961f-82ee72b054a4>2006-07-17 15:21:42 +0000
commite3e31408af889ba123f0a120c6a37b529c4a1083 (patch)
tree1de2148e94c4d8050f60710c6d1566a3463e48af
parent14571b8ce3f3cd121f045f851e5db171b2f6341e (diff)
downloadgcc-e3e31408af889ba123f0a120c6a37b529c4a1083.tar.gz
PR c++/28304
* decl2.c (check_classfn): Return NULL_TREE on error. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@115521 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/decl2.c7
2 files changed, 10 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 821df2bde78..4741d4a996c 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+2006-07-17 Steve Ellcey <sje@cup.hp.com>
+
+ PR c++/28304
+ * decl2.c (check_classfn): Return NULL_TREE on error.
+
2006-07-17 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c++/28250
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c
index dfb30f25d93..385f8d96c8f 100644
--- a/gcc/cp/decl2.c
+++ b/gcc/cp/decl2.c
@@ -673,8 +673,11 @@ check_classfn (tree ctype, tree function, tree template_parms)
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