diff options
author | Jason Merrill <jason@gcc.gnu.org> | 2001-11-15 10:09:43 -0500 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2001-11-15 10:09:43 -0500 |
commit | 8a2b77e7376a10b62a023843a64d4998fde5b5da (patch) | |
tree | 3a2e64bbd40a3c54769c05fc7a160ad65a8d29fc /gcc/cp/search.c | |
parent | 9bddde52b4cf9c9a4609e2288893c57a1da0abd7 (diff) | |
download | gcc-8a2b77e7376a10b62a023843a64d4998fde5b5da.zip gcc-8a2b77e7376a10b62a023843a64d4998fde5b5da.tar.gz gcc-8a2b77e7376a10b62a023843a64d4998fde5b5da.tar.bz2 |
parse.y: Add ...
* parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
* decl.c (make_typename_type): Handle getting a class template.
* search.c (lookup_field_r): A class template is good enough for
want_type.
* call.c (convert_like_real): Only use cp_convert for the bad part.
(standard_conversion): Also allow bad int->enum.
* typeck.c (ptr_reasonably_similar): Also allow functions to
interconvert. Pointers to same-size integers are reasonably
similar.
* cvt.c (convert_to_void): If we build a new COND_EXPR, always
give it void type.
From-SVN: r47060
Diffstat (limited to 'gcc/cp/search.c')
-rw-r--r-- | gcc/cp/search.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/cp/search.c b/gcc/cp/search.c index e7076f5..e09aa23 100644 --- a/gcc/cp/search.c +++ b/gcc/cp/search.c @@ -1367,7 +1367,8 @@ lookup_field_r (binfo, data) /* If we're looking up a type (as with an elaborated type specifier) we ignore all non-types we find. */ - if (lfi->want_type && TREE_CODE (nval) != TYPE_DECL) + if (lfi->want_type && TREE_CODE (nval) != TYPE_DECL + && !DECL_CLASS_TEMPLATE_P (nval)) { if (lfi->name == TYPE_IDENTIFIER (type)) { @@ -1727,9 +1728,9 @@ lookup_fnfields_1 (type, name) } /* Walk the class hierarchy dominated by TYPE. FN is called for each - type in the hierarchy, in a breadth-first preorder traversal. . + type in the hierarchy, in a breadth-first preorder traversal. If it ever returns a non-NULL value, that value is immediately - returned and the walk is terminated. At each node FN, is passed a + returned and the walk is terminated. At each node, FN is passed a BINFO indicating the path from the curently visited base-class to TYPE. Before each base-class is walked QFN is called. If the value returned is non-zero, the base-class is walked; otherwise it |