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]

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



Knuth reintroduced the following notation in his book \emph{Concrete
Mathematics}: [predicate] indicates Iverson notation yielding 1 if the
predicate is true and other 0.

When gcc/cp/call.c:joust() calls gcc/cp/pt.c:more_specialized(), the
last "len" parameter is the result of subtracting the number of
?converted arguments? and [function has a "this" member].
Empirically, it seems that the number of converted arguments does not
include the "this" parameter so the subtraction does not make sense.

Also confusing is that the "this" parameter is removed from the
parameter declarations list by fn_type_unification(), which is called
only a series of calls

gcc/cp/pt.c:more_specialized() calls
gcc/cp/pt.c:get_bindings_real() calls
gcc/cp/pt.c:fn_type_unification().

Is this analysis correct?  Is modifying the more_specialized()
invocation to remove the Iverson predicate acceptable?  Why does
removing "this" occur so much later?

Thanks for the help,
Jeffrey D. Oldham
oldham@codesourcery.com


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