diff options
author | Jason Merrill <jason@gcc.gnu.org> | 2000-12-22 19:05:44 -0500 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2000-12-22 19:05:44 -0500 |
commit | 16e42e7cfffeb1a3b71204886814486149f7ce84 (patch) | |
tree | bcb4c59c841f7d8fa70b07bfb2456fc46c0bc28f /gcc | |
parent | ebb1abc3e45a4b8d83779a134d341c871d960332 (diff) | |
download | gcc-16e42e7cfffeb1a3b71204886814486149f7ce84.zip gcc-16e42e7cfffeb1a3b71204886814486149f7ce84.tar.gz gcc-16e42e7cfffeb1a3b71204886814486149f7ce84.tar.bz2 |
pt.c (more_specialized): Don't optimize len==0.
* pt.c (more_specialized): Don't optimize len==0.
(fn_type_unification): If we're adding the return type, increase len.
From-SVN: r38472
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cp/pt.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 0a260df..0c4991a 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -7666,6 +7666,8 @@ fn_type_unification (fn, explicit_targs, targs, args, 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); + if (len >= 0) + ++len; } /* We allow incomplete unification without an error message here @@ -8875,9 +8877,6 @@ more_specialized (pat1, pat2, len) tree targs; int winner = 0; - if (len == 0) - return 0; - targs = get_bindings_order (pat1, DECL_TEMPLATE_RESULT (pat2), len); if (targs) --winner; |