This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: C++ attributes ?


>>>>> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]