This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: C++ attributes ?
- To: law at cygnus dot com
- Subject: Re: C++ attributes ?
- From: Jason Merrill <jason at cygnus dot com>
- Date: 31 Aug 1999 14:55:12 -0700
- Cc: Marc dot Espie at liafa dot jussieu dot fr, Mike Stump <mrs at wrs dot com>, egcs-bugs at egcs dot cygnus dot com
- References: <19942.936134713@upchuck.cygnus.com>
>>>>> Jeffrey A Law <law@cygnus.com> writes:
> Now, can someone please explain to Marc what that COM stuff does at a high
> level since Marc has volunteered to write up some documentation.
As I understand it, COM is basically a language-independent interface for
doing virtual function calls. It requires that the vtable pointer be the
first thing in an object, that the vtable consist of plain function
pointers (i.e. thunks), and that the function pointers begin at offset 0.
The com_interface attribute causes g++ to drop the RTTI entries from the
beginning of the vtable so that the pointers will begin at offset 0. It
might be better to shift the RTTI entries to negative offsets, but I was
lazy.
Jason