This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Runtime warning: Symbol [vtable] has different size in shared object, consider relinking
- From: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- To: Tyler Cardon <tyler dot k dot cardon at gmail dot com>
- Cc: gcc-help <gcc-help at gcc dot gnu dot org>
- Date: Wed, 8 Jan 2014 08:56:59 +0000
- Subject: Re: Runtime warning: Symbol [vtable] has different size in shared object, consider relinking
- Authentication-results: sourceware.org; auth=none
- References: <1389135965518-1000550 dot post at n5 dot nabble dot 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.