User guide

Language Compatibility
41
The default system C++ compiler included with Red Hat Enterprise Linux 6 conforms to the C++ ABI
defined by the Itanium C++ ABI (1.86)
4
.
Although every effort has been made to keep each version of GCC compatibile with previous releases,
some incompatibilities do exist.
ABI incompatibilities between RHEL6 and RHEL5
The following is a list of known incompatibilities between the Red Hat Enterprise Linux 6 and 5
toolchains.
Passing/returning structs with flexible array members by value changed in some cases on Intel 64
and AMD64.
Passing/returning of unions with long double members by value changed in some cases on Intel 64
and AMD64.
Passing/returning structs with complex float member by value changed in some cases on Intel 64
and AMD64.
Passing of 256-bit vectors on x86, Intel 64 and AMD64 platforms changed when -mavx is used.
There have been multiple changes in passing of _Decimal{32,64,128} types and aggregates
containing those by value on several targets.
Packing of packed char bitfields changed in some cases.
ABI incompatibilities between RHEL5 and RHEL4
The following is a list of known incompatibilities between the Red Hat Enterprise Linux 5 and 4
toolchains.
There have been changes in the library interface specified by the C++ ABI for thread-safe
initialization of function-scope static variables.
On Intel 64 and AMD64, the medium model for building applications where data segment
exceeds 4GB, was redesigned to match the latest ABI draft at the time. The ABI change results in
incompatibility among medium model objects.
The compiler flag -Wabi can be used to get diagnostics indicating where these constructs appear in
source code, though it will not catch every single case. This flag is especially useful for C++ code to
warn whenever the compiler generates code that is known to be incompatible with the vendor-neutral
C++ ABI.
Excluding the incompatibilities listed above, the GCC C and C++ language ABIs are mostly ABI
compatible. The vast majority of source code will not encounter any of the known issues, and can be
considered compatible.
Compatible ABIs allow the objects created by compiling source code to be portable to other systems.
In particular, for Red Hat Enterprise Linux, this allows for upward compatibility. Upward compatibility is
defined as the ability to link shared libraries and objects, created using a version of the compilers in a
particular RHEL release, with no problems. This includes new objects compiled on subsequent RHEL
releases.
4
http://www.codesourcery.com/cxx-abi/