https://gcc.gnu.org/g:b13bb5045c5010f38169b9786819a024f64fb59d
commit r16-148-gb13bb5045c5010f38169b9786819a024f64fb59d Author: Jason Merrill <ja...@redhat.com> Date: Tue Apr 22 16:37:30 2025 -0400 c++: add -fabi-version=21 I'm about to add a bugfix that changes the ABI of noexcept lambdas, so first let's add the new ABI version. And I think it's time to update the compatibility version; let's bump to GCC 13, before the addition of concepts mangling. gcc/ChangeLog: * common.opt: Add ABI v21. gcc/c-family/ChangeLog: * c-opts.cc (c_common_post_options): Bump default ABI to 21 and compat ABI to 18. gcc/testsuite/ChangeLog: * g++.dg/abi/macro0.C: Update for -fabi-version=21. Diff: --- gcc/common.opt | 3 +++ gcc/c-family/c-opts.cc | 6 +++--- gcc/testsuite/g++.dg/abi/macro0.C | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/gcc/common.opt b/gcc/common.opt index e3fa0dacec4c..d10a6b7e533a 100644 --- a/gcc/common.opt +++ b/gcc/common.opt @@ -1061,6 +1061,9 @@ Driver Undocumented ; 20: Fix mangling of lambdas in static data member initializers. ; Default in G++ 15. ; +; 21: +; Default in G++ 16. +; ; Additional positive integers will be assigned as new versions of ; the ABI become the default version of the ABI. fabi-version= diff --git a/gcc/c-family/c-opts.cc b/gcc/c-family/c-opts.cc index d43b3aef1024..40163821948b 100644 --- a/gcc/c-family/c-opts.cc +++ b/gcc/c-family/c-opts.cc @@ -1084,9 +1084,9 @@ c_common_post_options (const char **pfilename) /* Change flag_abi_version to be the actual current ABI level, for the benefit of c_cpp_builtins, and to make comparison simpler. */ - const int latest_abi_version = 20; - /* Generate compatibility aliases for ABI v13 (8.2) by default. */ - const int abi_compat_default = 13; + const int latest_abi_version = 21; + /* Generate compatibility aliases for ABI v18 (GCC 13) by default. */ + const int abi_compat_default = 18; #define clamp(X) if (X == 0 || X > latest_abi_version) X = latest_abi_version clamp (flag_abi_version); diff --git a/gcc/testsuite/g++.dg/abi/macro0.C b/gcc/testsuite/g++.dg/abi/macro0.C index f6a57c11ae70..3dd44fcbae90 100644 --- a/gcc/testsuite/g++.dg/abi/macro0.C +++ b/gcc/testsuite/g++.dg/abi/macro0.C @@ -1,6 +1,6 @@ // This testcase will need to be kept in sync with c_common_post_options. // { dg-options "-fabi-version=0" } -#if __GXX_ABI_VERSION != 1020 +#if __GXX_ABI_VERSION != 1021 #error "Incorrect value of __GXX_ABI_VERSION" #endif