How to use "thiscall" in g++, compatible with MS C++?

Miles Bader miles@gnu.org
Thu Feb 17 09:44:00 GMT 2011


yansheng si <siyansheng@gmail.com> writes:
> In GNU/G++, How to build a member function by following call rules, as
> MS C++ "thiscall":
>  Arguments are pushed on the stack in reverse order.
>  The object pointer is passed in ECX.
>  The callee pops arguments when returning.

The upcoming gcc release, 4.6, seems to have support for "__thiscall":

http://gcc.gnu.org/gcc-4.6/changes.html

-miles

-- 
"... The revolution will be no re-run brothers; The revolution will be live."



More information about the Gcc-help mailing list