Tested x86_64-pc-linux-gnu, applying to trunk.

-- 8< --

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/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 e3fa0dacec4..d10a6b7e533 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 d43b3aef102..40163821948 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 f6a57c11ae7..3dd44fcbae9 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

base-commit: 79ad792bf04dfa1109d1afdae93cee9fb457439b
-- 
2.49.0

Reply via email to