Compatibility between g++ 4.1 and 4.2
Ian Lance Taylor
iant@google.com
Sun Jan 20 16:13:00 GMT 2008
Stuart Brooks <stuartb@cat.co.za> writes:
> I was wondering if anyone could tell me whether C++ libraries compiled
> with gcc 4.2 are compatible with gcc 4.1 and vice versa. From
> http://gcc.gnu.org/onlinedocs/gcc/Compatibility.html I see that:
> "Starting with GCC 3.2, GCC binary conventions for C++ are based on
> a written, vendor-neutral C++ ABI "
> and:
> "We have tried hard to provide a stable ABI that will be compatible
> with future GCC releases, but it is possible that we will encounter
> problems that make this difficult"
>
> Does this mean I should have no problems?
In general, yes. Assuming there are no bugs. Also see the
-fabi-version option.
Be aware that there was a bug in gcc 4.2.1 which was not in gcc 4.2.0
or gcc 4.2.2: the virtual table layout of the std::type_info class was
accidentally reordered.
Ian
More information about the Gcc-help
mailing list