This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: About -fms-abi patch
- To: <egcs at cygnus dot com>
- Subject: Re: About -fms-abi patch
- From: "Antonio Mendes de Oliveira Neto" <anmendes at splicenet dot com dot br>
- Date: Sun, 23 Aug 1998 17:02:18 -0300
In 1998-Aug-21 22:45 Martin von Loewis wrote:
> You did sign the copyright assignment, right? Otherwise, no code is
accepted.
I didn't know about the existence of this document. I will go you fill it
and you send it so that my patches is accepted
>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?
>
I found interesting its idea and I found a problem in its application. The
COM objects they should use the vtable-thunks to work and it is a very
complicated process to define it for a simple class since that is a global
alteration of the system. I don't know if it would be a lot of advantage to
use an attribute as "comobject" if I still have to use the option
"-fvtable-thunks", in this case it would be more advantageous the use of the
option "-fms-abi". Unless you know how to tell me if an alteration just in
the file "class.c" so that he uses the vtable-thunks, when there is the
attribute "comobject" it would not provoke mistakes in the compiler's other
parts since the vtable-thunks is a global option and I would only be
modifying it in that file.
Antonio Mendes de Oliveira Neto (new e-mail address
anmendes@splicenet.com.br)