Help: C++ virtual tables not created

Martin von Loewis martin@mira.isdn.cs.tu-berlin.de
Mon Dec 22 07:42:00 GMT 1997


> So to me, this looks like a bug in cpp and not in cc1plus ?!

Quite unlikely. More likely, you are getting the wrong header files
on openVMS.

> Question is, what makes the c++-compiler generate virtual tables. I can't
> get a clue from 'diff'ing the preprocessor outputs.

AFAIK, g++ looks for some attributes of the class, and implements the
VT in the file which also has the attribute. A possible list is:
- first virtual function is implemented here
- first static member data is implemented here
- first non-inline constructor is implemented here
or the like. These are not the actual criteria used by g++, but you
get the idea.

Regards,
Martin



More information about the Gcc mailing list