diff options
author | Steve Ellcey <sje@cup.hp.com> | 2006-08-01 16:45:14 +0000 |
---|---|---|
committer | Steve Ellcey <sje@gcc.gnu.org> | 2006-08-01 16:45:14 +0000 |
commit | a82f93ac13c4280fdf2b5d48648bfc3f7668406b (patch) | |
tree | 1419123d4eb2f44dcc0914f5ddf24a041af5c4c6 /gcc/cp/search.c | |
parent | f47165c975758bb03b5427a0a72273e535189883 (diff) | |
download | gcc-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.c | 3 |
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; } |