]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR c++/9420 (incomplete type incorrectly reported)
authorJason Merrill <jason@redhat.com>
Thu, 13 Mar 2003 21:41:38 +0000 (16:41 -0500)
committerJason Merrill <jason@gcc.gnu.org>
Thu, 13 Mar 2003 21:41:38 +0000 (16:41 -0500)
        PR c++/9420
        * search.c (lookup_conversions): Call complete_type here.
        * call.c (implicit_conversion): Not here.

From-SVN: r64334

gcc/cp/ChangeLog
gcc/cp/call.c
gcc/cp/search.c

index 27697e271561d14e0fb50a37e511f5712c5fa696..d306a402074a915af31d242146d89ce6c7300a1b 100644 (file)
@@ -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-12  Andrew Lewycky  <andrew@mxc.ca>
 
        PR c++/7050
index d0096de36806115217ebc381b54fa4bcff592cc1..6d0c84de103b95a7eecddd7126a96739243bc0bd 100644 (file)
@@ -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
index 38f46341aef89160ebb7282ef6132a72b3e7f713..3c39b64412dc62e88cb8f2a3acd089eb9f1ad78e 100644 (file)
@@ -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;