aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2025-04-22 16:37:30 -0400
committerJason Merrill <jason@redhat.com>2025-04-25 11:50:52 -0400
commitb13bb5045c5010f38169b9786819a024f64fb59d (patch)
tree5d8240e6bc61c33311e9589897ac39386f79197e
parent79ad792bf04dfa1109d1afdae93cee9fb457439b (diff)
downloadgcc-b13bb5045c5010f38169b9786819a024f64fb59d.zip
gcc-b13bb5045c5010f38169b9786819a024f64fb59d.tar.gz
gcc-b13bb5045c5010f38169b9786819a024f64fb59d.tar.bz2
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.
-rw-r--r--gcc/c-family/c-opts.cc6
-rw-r--r--gcc/common.opt3
-rw-r--r--gcc/testsuite/g++.dg/abi/macro0.C2
3 files changed, 7 insertions, 4 deletions
diff --git a/gcc/c-family/c-opts.cc b/gcc/c-family/c-opts.cc
index d43b3ae..4016382 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/common.opt b/gcc/common.opt
index e3fa0da..d10a6b7 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/testsuite/g++.dg/abi/macro0.C b/gcc/testsuite/g++.dg/abi/macro0.C
index f6a57c1..3dd44fc 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