This is the mail archive of the egcs@egcs.cygnus.com mailing list for the EGCS project. See the EGCS home page for more information.


[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index] [Subject Index] [Author Index] [Thread Index]

Re: Status: vtable thunks for base classes bug.



> Why do you say that?  All it does is suppress copying the arguments to a
> call.

Yes, but the description is:

/* Nonzero if the current function is a thunk (a lightweight function that
   just adjusts one of its arguments and forwards to another function), so
   we should try to cut corners where we can.  */
int current_function_is_thunk;

So I concluded that, if it does more than modifying an argument
(namely add another one), it can't be a thunk anymore.

When I thought about this wrapper, I found that we can use your trick
of passing the parameter in a vptr of a vbase, and indicate such a
hidden parameter with a flag in in_chrg. That would mean that the
wrapper has no additional parameters, and it might well count as a
thunk.

Regards,
Martin