[cfe-dev] __GXX_ABI_VERSION

Nathan Ridge zeratul976 at hotmail.com
Thu Jun 18 23:43:44 PDT 2015


GCC defines a macro __GXX_ABI_VERSION which, as was recently explained to me [1],
is governed by the flag -fabi-version [2].

The latest version of GCC defines the macro (without an explicit -fabi-version flag) as 
1008, which corresponds to what is described as "Version 8" on that page.

Clang defines the macro as 1002, and does not seem to support the -fabi-version
option (tested with clang 3.6).

Does this mean that clang currently implements the "Version 2" ABI described on 
that page? If so, are there plans to implement the later versions?

I ask because some libraries, such as wxWidgets, check this macro to ensure that
a build of the library and an application using the library are ABI-compatible, and
right now that mechanism deems the latest versions of gcc and clang incompatible.


[1] https://gcc.gnu.org/ml/gcc-help/2015-06/msg00090.html
[2] https://gcc.gnu.org/onlinedocs/gcc/C_002b_002b-Dialect-Options.html

More information about the cfe-dev mailing list