From: Jason Merrill Date: Thu, 13 Mar 2003 21:41:38 +0000 (-0500) Subject: re PR c++/9420 (incomplete type incorrectly reported) X-Git-Tag: releases/gcc-3.2.3~117 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fec66e300c70d0de29ce54e54962d89f6bf4ad87;p=thirdparty%2Fgcc.git 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: r64334 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 27697e271561..d306a402074a 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2003-03-13 Jason Merrill + + PR c++/9420 + * search.c (lookup_conversions): Call complete_type here. + * call.c (implicit_conversion): Not here. + 2003-03-12 Andrew Lewycky PR c++/7050 diff --git a/gcc/cp/call.c b/gcc/cp/call.c index d0096de36806..6d0c84de103b 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -1266,11 +1266,6 @@ implicit_conversion (to, from, expr, 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 diff --git a/gcc/cp/search.c b/gcc/cp/search.c index 38f46341aef8..3c39b64412dc 100644 --- a/gcc/cp/search.c +++ b/gcc/cp/search.c @@ -2693,8 +2693,8 @@ lookup_conversions (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;