This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: Bug? Where are these emitted?? (type_info, virtual table, etc)
- To: "'Alexandre Oliva'" <oliva at dcc dot unicamp dot br>
- Subject: RE: Bug? Where are these emitted?? (type_info, virtual table, etc)
- From: Phil Edwards <pedwards at ball dot com>
- Date: Tue, 6 Oct 1998 11:13:08 -0400
- Cc: "'egcs at cygnus dot com'" <egcs at cygnus dot com>
- Organization: BATC
- Reply-To: "pedwards at ball dot com" <pedwards at ball dot com>
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)