Re: Compiler ABI changes and XPCOM components

Doug Turner <[email protected]>
Newsgroups gmane.comp.mozilla.devel.xpcom
Organization Another Netscape Collabra Server User
Message-ID <[email protected]>
Pierre Phaneuf wrote:
> Doug Turner wrote:
> 
> 
>>>There is nothing XPCOM can do about this. Different C++
>>>Compilers mangle function names differently, so that a
>>>gcc3-compiled Plugin will expect a different function name
>>>from what actually exists on a gcc2-compiled Mozilla.
>>
>>exactly!
> 
> Almost, but not quite exactly. Mangling has very little effect for XPCOM
> interfaces, but virtual method table layout has. Specifically, the few
> places where mangling could have any effect are probably ordinary
> functions rather than methods and could be protected with a "C" linkage.

I don't think that we were talking about vtable layout here.  My next 
sentence was "...that most, if not all, components that I have looked at 
do import something from xpcom."

> A number of compilers have options to make virtual method tables follow
> the Microsoft COM layout (which is documented in the COM Specification),
> so I suppose that Mozilla should use these options as much as possible
> (it is usually an attribute that you give to a parent-less class and
> which is inherited).

Is there a option for this in gcc?  bbaetz?


Doug Turner
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.