This is the mail archive of the gcc@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: Bug? Where are these emitted?? (type_info, virtual table, etc)


Alexandre Oliva wrote:
> 8 A virtual function declared in a class shall be defined,  or  declared
>   pure  (_class.abstract_)  in that class, or both; but no diagnostic is
>   required (_basic.def.odr_).
>
> So you're violating the standard by not providing a definition of a
> virtual non-abstract member function.

Brain skip on my part; thank you.

> gcc will emit the virtual table of a class in the translation unit
> that contains the definition of the first non-inline non-abstract
> member function.

That's common behavior as I understand it.  Curious that the linker 
complained about 'missing virtual table' and the contained type_info, but 
never about a missing non-abstract impure virtual definition.  Perhaps it 
just gives up after three missing defs?  (I've never found a way to study 
linker design; they're complete black magic to me.)

>  Strangely, this is heuristics is documented as
> enabled only if -fvtable-thunks is enabled, but it is not enabled by
> default on Solaris.

I was wondering about that too; there are a couple -f directives that seem to 
be undocumented in 1.1.

Thanks.

--
/dev/phil            Ball Aerospace & Technologies Corp.
pedwards@ball.com    Advanced Systems & Technology Operations
(937-320-4048)



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