This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: g++, this, more_specialized(), and fn_type_unification()
- To: Jeffrey Oldham <oldham at codesourcery dot com>
- Subject: Re: g++, this, more_specialized(), and fn_type_unification()
- From: Jason Merrill <jason at redhat dot com>
- Date: 21 Feb 2001 10:48:35 +0000
- Cc: gcc at gcc dot gnu dot org
- References: <20010220200750.A25359@codesourcery.com>
>>>>> "Jeffrey" == Jeffrey Oldham <oldham@codesourcery.com> writes:
> The attached preprocessed C++ file causes the mainline cc1plus to
> incorrectly complain that the Array() is overloaded. The correct
> answer is to prefer the more specialized Array() on line 1413 over the
> Array() on line 1465.
> The problem seems to be that the call to more_specialized() in
> gcc/cp/call.c:joust() is called with a "len" argument of 1, not 2, as
> it should be.
> (In the call, removing the call to "DECL_NONSTATIC_MEMBER_FUNCTION_P"
> causes the test case gcc/testsuite/g++.old-deja/g++.pt/partial5.C to
> fail.)
> How do I fix this? Is the problem that this is a constructor
> function?
Seems plausible, but there should still be a 'this' argument for a
constructor call. Why are there only two conversions in the candidate?
BTW, please don't attach something that large.
Jason