arguments in both directions.
* typeck.c (common_type): Undo 1999-08-18 change. Remove
compiler_error message.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@28774
138bc75d-0d04-0410-961f-
82ee72b054a4
+1999-08-19 Mark Mitchell <mark@codesourcery.com>
+
+ * pt.c (redeclare_class_template): Merge default template
+ arguments in both directions.
+
+ * typeck.c (common_type): Undo 1999-08-18 change. Remove
+ compiler_error message.
+
1999-08-19 Jason Merrill <jason@yorick.cygnus.com>
* cp-tree.h: Declare flag_use_repository.
/* Update the previous template parameters (which are the ones
that will really count) with the new default value. */
TREE_PURPOSE (TREE_VEC_ELT (tmpl_parms, i)) = parm_default;
+ else if (tmpl_default != NULL_TREE)
+ /* Update the new parameters, too; they'll be used as the
+ parameters for any members. */
+ TREE_PURPOSE (TREE_VEC_ELT (parms, i)) = tmpl_default;
}
}
tt1 = TYPE_MAIN_VARIANT (tt1);
tt2 = TYPE_MAIN_VARIANT (tt2);
- if (same_type_p (tt1, tt2))
+ if (tt1 == tt2)
target = tt1;
- else if (b1)
- {
- compiler_error ("common_type called with uncommon member types");
- target = tt1;
- }
else if (tt1 == void_type_node || tt2 == void_type_node)
target = void_type_node;
else if (tt1 == unknown_type_node)
--- /dev/null
+// Build don't link:
+// Origin: Jason Merrill <jason@cygnus.com>
+
+template <class T, class U = int> struct A;
+template <class T = int, class U> struct A { };