This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
g++, this, more_specialized(), and fn_type_unification()
- To: jason at redhat dot com
- Subject: g++, this, more_specialized(), and fn_type_unification()
- From: Jeffrey Oldham <oldham at codesourcery dot com>
- Date: Thu, 15 Feb 2001 21:30:28 -0800
- cC: oldham at codesourcery dot com, gcc at gcc dot gnu dot org
- Reply-to: oldham at codesourcery dot com
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