This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: g++, this, more_specialized(), and fn_type_unification()


>>>>> "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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]