public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jonathan Wakely <jwakely.gcc@gmail.com>
To: Tyler Cardon <tyler.k.cardon@gmail.com>
Cc: gcc-help <gcc-help@gcc.gnu.org>
Subject: Re: Runtime warning: Symbol [vtable] has different size in shared object, consider relinking
Date: Wed, 08 Jan 2014 08:57:00 -0000	[thread overview]
Message-ID: <CAH6eHdQMKnZ98bjY8XezaTdnvsZje0MSSOD8M0iq5swdv1_0sA@mail.gmail.com> (raw)
In-Reply-To: <1389135965518-1000550.post@n5.nabble.com>

On Jan 7, 2014 11:06 PM, "Tyler Cardon" wrote:
>
> Does this mean that adding virtual method declarations (even without
> changing virtual method order) breaks the base class library's abi?

It is a violation of the C++ One Definition Rule, so undefined behaviour.

It will not behave correctly if you have a class that has CTest as a
(direct or indirect) base class and adds new virtual functions to the
vtable, because the new functions will be expected to appear in
different slots in the vtable depending on which version of the base
class has been seen.

You might find http://techbase.kde.org/Policies/Binary_Compatibility_Issues_With_C++
useful.

      reply	other threads:[~2014-01-08  8:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-07 23:06 Tyler Cardon
2014-01-08  8:57 ` Jonathan Wakely [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAH6eHdQMKnZ98bjY8XezaTdnvsZje0MSSOD8M0iq5swdv1_0sA@mail.gmail.com \
    --to=jwakely.gcc@gmail.com \
    --cc=gcc-help@gcc.gnu.org \
    --cc=tyler.k.cardon@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).