re PR c++/9420 (incomplete type incorrectly reported)
PR c++/9420 * search.c (lookup_conversions): Call complete_type here. * call.c (implicit_conversion): Not here. From-SVN: r64332
This commit is contained in:
parent
45707d3120
commit
0171b21c32
3 changed files with 8 additions and 7 deletions
|
@ -1,3 +1,9 @@
|
|||
2003-03-13 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR c++/9420
|
||||
* search.c (lookup_conversions): Call complete_type here.
|
||||
* call.c (implicit_conversion): Not here.
|
||||
|
||||
2003-03-13 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
* decl2.c (do_nonmember_using_decl): Correct handling of
|
||||
|
|
|
@ -1305,11 +1305,6 @@ implicit_conversion (tree to, tree from, tree expr, int flags)
|
|||
|| expr == error_mark_node)
|
||||
return NULL_TREE;
|
||||
|
||||
/* Make sure both the FROM and TO types are complete so that
|
||||
user-defined conversions are available. */
|
||||
complete_type (from);
|
||||
complete_type (to);
|
||||
|
||||
if (TREE_CODE (to) == REFERENCE_TYPE)
|
||||
conv = reference_binding (to, from, expr, flags);
|
||||
else
|
||||
|
|
|
@ -2271,8 +2271,8 @@ lookup_conversions (tree type)
|
|||
tree t;
|
||||
tree conversions = NULL_TREE;
|
||||
|
||||
if (COMPLETE_TYPE_P (type))
|
||||
bfs_walk (TYPE_BINFO (type), add_conversions, 0, &conversions);
|
||||
complete_type (type);
|
||||
bfs_walk (TYPE_BINFO (type), add_conversions, 0, &conversions);
|
||||
|
||||
for (t = conversions; t; t = TREE_CHAIN (t))
|
||||
IDENTIFIER_MARKED (DECL_NAME (OVL_CURRENT (TREE_VALUE (t)))) = 0;
|
||||
|
|
Loading…
Add table
Reference in a new issue