pt.c (type_unification_real): Remove allow_incomplete argument.
authorNathan Sidwell <nathan@codesourcery.com>
Thu, 7 Jul 2005 14:38:33 +0000 (14:38 +0000)
committerNathan Sidwell <nathan@gcc.gnu.org>
Thu, 7 Jul 2005 14:38:33 +0000 (14:38 +0000)
* pt.c (type_unification_real): Remove allow_incomplete argument.
Remove unreachable code.
(fn_type_unification): Adjust call to type_unification_real.
(unify): Likewise.

From-SVN: r101714

gcc/cp/ChangeLog
gcc/cp/pt.c

index 0140cde4328a65c12272102ec262affd9dc64030..36a5e59283e3483b33e23373fb2a98dcda549dfb 100644 (file)
@@ -1,3 +1,10 @@
+2005-07-07  Nathan Sidwell  <nathan@codesourcery.com>
+
+       * pt.c (type_unification_real): Remove allow_incomplete argument.
+       Remove unreachable code.
+       (fn_type_unification): Adjust call to type_unification_real.
+       (unify): Likewise.
+
 2005-07-05  Paolo Bonzini  <bonzini@gnu.org>
 
        * Makefile.in (class.o, decl2.o): Adjust dependencies.
index 3b4c588ee302d4045b930ed70ee3d62856d9b8e5..d27e523400960adbe542d39cd05150d50795ec0a 100644 (file)
@@ -109,7 +109,7 @@ static tree add_outermost_template_args (tree, tree);
 static bool check_instantiated_args (tree, tree, tsubst_flags_t);
 static int maybe_adjust_types_for_deduction (unification_kind_t, tree*, tree*);
 static int  type_unification_real (tree, tree, tree, tree,
-                                  int, unification_kind_t, int);
+                                  int, unification_kind_t);
 static void note_template_header (int);
 static tree convert_nontype_argument_function (tree, tree);
 static tree convert_nontype_argument (tree, tree);
@@ -9167,7 +9167,6 @@ fn_type_unification (tree fn,
 
   if (return_type)
     {
-      /* We've been given a return type to match, prepend it.  */
       parms = tree_cons (NULL_TREE, TREE_TYPE (fntype), parms);
       args = tree_cons (NULL_TREE, return_type, args);
     }
@@ -9178,7 +9177,7 @@ fn_type_unification (tree fn,
      event.  */
   result = type_unification_real (DECL_INNERMOST_TEMPLATE_PARMS (fn),
                                  targs, parms, args, /*subr=*/0,
-                                 strict, /*allow_incomplete*/1);
+                                 strict);
 
   if (result == 0)
     /* All is well so far.  Now, check:
@@ -9294,8 +9293,7 @@ type_unification_real (tree tparms,
                       tree xparms,
                       tree xargs,
                       int subr,
-                      unification_kind_t strict,
-                      int allow_incomplete)
+                      unification_kind_t strict)
 {
   tree parm, arg;
   int i;
@@ -9426,8 +9424,6 @@ type_unification_real (tree tparms,
              && !saw_undeduced++)
            goto again;
 
-         if (!allow_incomplete)
-           error ("incomplete type unification");
          return 2;
        }
 
@@ -10253,8 +10249,7 @@ unify (tree tparms, tree targs, tree parm, tree arg, int strict)
                 TREE_TYPE (arg), UNIFY_ALLOW_NONE))
        return 1;
       return type_unification_real (tparms, targs, TYPE_ARG_TYPES (parm),
-                                   TYPE_ARG_TYPES (arg), 1,
-                                   DEDUCE_EXACT, 0);
+                                   TYPE_ARG_TYPES (arg), 1, DEDUCE_EXACT);
 
     case OFFSET_TYPE:
       /* Unify a pointer to member with a pointer to member function, which