aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/search.c
diff options
context:
space:
mode:
authorSteve Ellcey <sje@cup.hp.com>2006-08-01 16:45:14 +0000
committerSteve Ellcey <sje@gcc.gnu.org>2006-08-01 16:45:14 +0000
commita82f93ac13c4280fdf2b5d48648bfc3f7668406b (patch)
tree1419123d4eb2f44dcc0914f5ddf24a041af5c4c6 /gcc/cp/search.c
parentf47165c975758bb03b5427a0a72273e535189883 (diff)
downloadgcc-a82f93ac13c4280fdf2b5d48648bfc3f7668406b.zip
gcc-a82f93ac13c4280fdf2b5d48648bfc3f7668406b.tar.gz
gcc-a82f93ac13c4280fdf2b5d48648bfc3f7668406b.tar.bz2
re PR c++/28432 (duplicate "no member function declared" message)
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: r115857
Diffstat (limited to 'gcc/cp/search.c')
-rw-r--r--gcc/cp/search.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/cp/search.c b/gcc/cp/search.c
index 50e704f..d54e607 100644
--- a/gcc/cp/search.c
+++ b/gcc/cp/search.c
@@ -1209,7 +1209,8 @@ lookup_member (tree xbasetype, tree name, int protect, bool want_type)
}
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;
}