diff options
author | Jason Merrill <jason@redhat.com> | 2021-03-31 17:48:50 -0400 |
---|---|---|
committer | Jason Merrill <jason@redhat.com> | 2021-04-01 10:04:38 -0400 |
commit | 5f00df5925082c7b66da91270f2ed29bf4818c93 (patch) | |
tree | 8a28c3c9d6bb27eefba0e44fb21407d17c0a0199 /gcc/cp/class.c | |
parent | 584731ecedf09c2c067913c4af9ed0a30cf19e8d (diff) | |
download | gcc-5f00df5925082c7b66da91270f2ed29bf4818c93.zip gcc-5f00df5925082c7b66da91270f2ed29bf4818c93.tar.gz gcc-5f00df5925082c7b66da91270f2ed29bf4818c93.tar.bz2 |
c++: Add ABI version for PR98481 fix
The PR98481 fix corrects an ABI regression in GCC 10, but we don't want to
introduce an ABI change in the middle of the GCC 10 cycle. This patch
introduces ABI v15 for the fix, which will be available but not default in
GCC 10.3; the broken behavior remains in ABI v14. Compatibility aliases
will not be generated for this change.
gcc/ChangeLog:
PR c++/98481
* common.opt: Document v15 and v16.
gcc/c-family/ChangeLog:
PR c++/98481
* c-opts.c (c_common_post_options): Bump latest_abi_version.
gcc/cp/ChangeLog:
PR c++/98481
* mangle.c (write_expression): Adjust.
* class.c (find_abi_tags_r): Disable PR98481 fix for ABI v14.
(mark_abi_tags_r): Likewise.
gcc/testsuite/ChangeLog:
PR c++/98481
* g++.dg/abi/abi-tag24a.C: New test.
* g++.dg/abi/macro0.C: Adjust expected value.
Diffstat (limited to 'gcc/cp/class.c')
-rw-r--r-- | gcc/cp/class.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/cp/class.c b/gcc/cp/class.c index 856e81e..4bffec4 100644 --- a/gcc/cp/class.c +++ b/gcc/cp/class.c @@ -1494,8 +1494,8 @@ mark_or_check_tags (tree t, tree *tp, abi_tag_data *p, bool val) static tree find_abi_tags_r (tree *tp, int *walk_subtrees, void *data) { - if (TYPE_P (*tp) && *walk_subtrees == 1) - /* Tell cp_walk_subtrees to look though typedefs. */ + if (TYPE_P (*tp) && *walk_subtrees == 1 && flag_abi_version != 14) + /* Tell cp_walk_subtrees to look though typedefs. [PR98481] */ *walk_subtrees = 2; if (!OVERLOAD_TYPE_P (*tp)) @@ -1518,7 +1518,7 @@ find_abi_tags_r (tree *tp, int *walk_subtrees, void *data) static tree mark_abi_tags_r (tree *tp, int *walk_subtrees, void *data) { - if (TYPE_P (*tp) && *walk_subtrees == 1) + if (TYPE_P (*tp) && *walk_subtrees == 1 && flag_abi_version != 14) /* Tell cp_walk_subtrees to look though typedefs. */ *walk_subtrees = 2; |