From owner-freebsd-current Sat Feb 15 12:53:49 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id MAA12700 for current-outgoing; Sat, 15 Feb 1997 12:53:49 -0800 (PST) Received: from phaeton.artisoft.com (phaeton.Artisoft.COM [198.17.250.50]) by freefall.freebsd.org (8.8.5/8.8.5) with SMTP id MAA12671 for ; Sat, 15 Feb 1997 12:53:36 -0800 (PST) Received: (from terry@localhost) by phaeton.artisoft.com (8.6.11/8.6.9) id NAA03985 for current@freebsd.org; Sat, 15 Feb 1997 13:52:50 -0700 From: Terry Lambert Message-Id: <199702152052.NAA03985@phaeton.artisoft.com> Subject: G++ calling conventions To: current@freebsd.org Date: Sat, 15 Feb 1997 13:52:50 -0700 (MST) X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-current@freebsd.org X-Loop: FreeBSD.org Precedence: bulk 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.