This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: About -fms-abi patch
- To: anmendes at splicenet dot com dot br
- Subject: Re: About -fms-abi patch
- From: Martin von Loewis <martin at mira dot isdn dot cs dot tu-berlin dot de>
- Date: Fri, 21 Aug 1998 09:02:13 +0200
- Cc: egcs at cygnus dot com
- References: <000701bdcc83$eae06b00$4340e7c8@anmendes>
> When the patches that I published (about the option -fms-abi) will they be
> included in the project?
Antonio,
I can't give an authorative answer, but I have two comments:
- You did sign the copyright assignment, right? Otherwise, no code is
accepted.
- As far as I recall, this patch changes the vtable layout for all classes,
so they work as COM interface implementations (correct me if I'm wrong).
This might also be a prerequisite for linking MFC etc, but I'm sure there
are other issues such as members layout that would prevent linking MSVC
generated libraries.
Thinking about this, I found that one might rather select the COM
compatibility on a per-class basis, so that classes not used as
ActiveX objects still enjoy the richer functionality (i.e. rtti,
correct exception handling, etc.)
So I'd propose an alternative where you give a class an attribute:
class __attribute__((comobject)) IUnknown{
//...
};
A class attributed that way will have COM compliant layout (i.e. the
vtable will just contain the proper stdcall methods). This attribute
is inherited to derived classes, so that you effectively only need to
modify IUnknown.
What do you think?
Martin