Date: Sat, 15 Feb 1997 13:52:50 -0700 (MST) From: Terry Lambert <terry@lambert.org> To: current@freebsd.org Subject: G++ calling conventions Message-ID: <199702152052.NAA03985@phaeton.artisoft.com>
next in thread | raw e-mail | index | archive | help
I have an application which aggregates a number of COM objects into a single implementation object for a set of interfaces (a set of pointers to code providing implementation for pure virtual base classes). Does anyone know if gcc and/or g++ support the __stdcall type designator? The __stdcall allows you to mark functions as callee-pop on a per function basis (and __cdecl allows you to mark functions caller-pop on a per function basis). For instance: struct ImyInterface { virtual void __stdcall function1() = 0; }; class CmyInterface : ImyInterface { public: CmyInterface(); ~CmyInterface(); virtual void __stdcall function1( void) = 0; }; ... // this function is callee-pop, and will pop its arguments off the // stack before returning... void __stdcall CmyInterface::function1( void) { ... } ...sort of like a generic "-mrtd" that doesn't need an rtd instruction? (Clearly, varradic functions must be __cdecl). ??? PS: What would be the chances of supporting the "interface" keyword as an alias for "struct" in a future release? This can be done in a FreeBSD-specific way using the g++ config data files (I think). Regards, Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199702152052.NAA03985>