This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: open watcom compiling gcc on win32
On Fri, Jan 30, 2004 at 04:49:03PM -0500, Ian Lance Taylor wrote:
> "Edward S. Peschko" <esp5@pge.com> writes:
>
> > > BTW, FYI, Borland is not C++ ABI compatible with MSVC++.
> >
> > reference? I see different.
> >
> > http://shop.store.yahoo.com/1-software-group/borcbuil50en.html
>
> I don't see anything there which says that the C++ ABI is the same.
> But I really have no information on the topic.
It comes under the heading of "Microsoft Visual C++ project 6 support". They don't
specifically mention ABI compatibility, but they mention that you can import
Microsoft visual C++ projects into Borland, and to link to VC++ dlls through an
import mechanism.
In any case, operationally you've been able to link Microsoft dll's to Borland
apps for years. Eg, the following discussion on google (1998):
http://makeashorterlink.com/?X1B225047
>
> On the other hand, I've heard several times that Microsoft has
> patented their vtable layout. That would make it impossible for gcc
> to emulate it, unless Microsoft gave explicit permission.
>
> Ian
yeah. patents. you just have to look for chinks in their armor.
Right now, I'm looking at the patent 5,481,708, which is a
'system and methods for optimizing object-oriented compilations', and
I assume is the patent that you are talking about.
http://makeashorterlink.com/?J28511047
The most pertinent claim is #1:
1. In a system for generating code executable by a computer from object-oriented
source listings, said source listings including definition of classes of objects
having data members and functions operative on said data members, the computer
including a memory stack for creating automatic variables, a method for passing
of objects by value to a function, the method comprising:
a) identifying by the system a class argument being passed by value as a
parameter to a particular function, said class argument comprising an
object to be instantiated from a particular class;
b) creating a surrogate variable for the class argument by allocating
space on the memory stack for storing said value; and
c) determining an address of said surrogate variable on the memory stack when code
referencing said class argument is generated.
Hmm. My attention is immediatly drawn to the phrase:
'In a system for generating code executable by a computer from object-oriented
source listings'
well, what I'm not talking about a system for genrating code executable by a computer
from object oriented source listings, I'm talking about a system that *reads*
an executable format. No source or compilation involved.
In other words, from what I read it would be verboten for g++ to *produce* a
format that is compatible with vc++. Which is fine - I really couldn't care less
if g++ produces dlls that vc++ can read - all I care is that g++ can read
dlls that vc++ produces.
Quite ironic really - by patenting the process they insure that other compiler
vendors can be compatible *with* them, but that other compiler vendors can't
produce compatible dlls; probably much more of a benefit to them than
whatever small speed increase this optimisation gives them.
Anyways, that's the way I read it. Any other interpretations or patents?
Ed