]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
c++: add -fabi-version=21
authorJason Merrill <jason@redhat.com>
Tue, 22 Apr 2025 20:37:30 +0000 (16:37 -0400)
committerJason Merrill <jason@redhat.com>
Fri, 25 Apr 2025 15:50:52 +0000 (11:50 -0400)
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.

gcc/c-family/c-opts.cc
gcc/common.opt
gcc/testsuite/g++.dg/abi/macro0.C

index d43b3aef10246fd36f94d4b5f2b35ab83d2418f0..40163821948bc70b5e63665d3e0bf0e73fd51b65 100644 (file)
@@ -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);
index e3fa0dacec4cf8e6318df6cfde131822d63dc845..d10a6b7e533a69dc9595a5616ba293cf440d7ae4 100644 (file)
@@ -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=
index f6a57c11ae701cdfda98785a8aaadf5f313cb0b7..3dd44fcbae90ac2b701d9d4cc0f8d6593260a32c 100644 (file)
@@ -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