aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJeffrey Oldham <oldham@codesourcery.com>2001-02-26 15:59:30 +0000
committerJeffrey D. Oldham <oldham@gcc.gnu.org>2001-02-26 15:59:30 +0000
commitfe7301610dfbad80fc917cb4c6aed0023903cfa5 (patch)
treee0751e43f529b08dec881da3f302144312638b5e /gcc
parent2851a0e4674532d87356e9e4a28f453511110796 (diff)
downloadgcc-fe7301610dfbad80fc917cb4c6aed0023903cfa5.zip
gcc-fe7301610dfbad80fc917cb4c6aed0023903cfa5.tar.gz
gcc-fe7301610dfbad80fc917cb4c6aed0023903cfa5.tar.bz2
call.c (joust): Ensure more_specialized()'s argument length parameter has correct value for...
2001-02-26 Jeffrey Oldham <oldham@codesourcery.com> * call.c (joust): Ensure more_specialized()'s argument length parameter has correct value for constructors. From-SVN: r40068
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/call.c10
2 files changed, 12 insertions, 3 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index ede5dc1..4b0b80b 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+2001-02-26 Jeffrey Oldham <oldham@codesourcery.com>
+
+ * call.c (joust): Ensure more_specialized()'s argument length
+ parameter has correct value for constructors.
+
2001-02-26 Nathan Sidwell <nathan@codesourcery.com>
* except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
diff --git a/gcc/cp/call.c b/gcc/cp/call.c
index b7e6e94..a9af402 100644
--- a/gcc/cp/call.c
+++ b/gcc/cp/call.c
@@ -5221,14 +5221,18 @@ joust (cand1, cand2, warn)
winner = more_specialized
(TI_TEMPLATE (cand1->template), TI_TEMPLATE (cand2->template),
DEDUCE_ORDER,
- /* Tell the deduction code how many real function arguments we saw,
- not counting the implicit 'this' argument.
+ /* Tell the deduction code how many real function arguments
+ we saw, not counting the implicit 'this' argument. But,
+ add_function_candidate() suppresses the "this" argument
+ for constructors.
[temp.func.order]: The presence of unused ellipsis and default
arguments has no effect on the partial ordering of function
templates. */
TREE_VEC_LENGTH (cand1->convs)
- - DECL_NONSTATIC_MEMBER_FUNCTION_P (cand1->fn));
+ - (DECL_NONSTATIC_MEMBER_FUNCTION_P (cand1->fn)
+ - DECL_CONSTRUCTOR_P (cand1->fn)));
+ /* HERE */
if (winner)
return winner;
}