diff options
author | Jason Merrill <jason@redhat.com> | 2013-04-03 20:14:00 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2013-04-03 20:14:00 -0400 |
commit | 0861bec80a0d8ff9aae4ed031e7f6869d37a3af2 (patch) | |
tree | db5ffa9a448dd27fa04e384e2492f7f9d32e6d9e /gcc/cp | |
parent | 4e8567986360dd629df5e60cfe881ac0916e45d0 (diff) | |
download | gcc-0861bec80a0d8ff9aae4ed031e7f6869d37a3af2.zip gcc-0861bec80a0d8ff9aae4ed031e7f6869d37a3af2.tar.gz gcc-0861bec80a0d8ff9aae4ed031e7f6869d37a3af2.tar.bz2 |
cp-demangle.c (cplus_demangle_type): Fix function quals.
libiberty/
* cp-demangle.c (cplus_demangle_type): Fix function quals.
(d_pointer_to_member_type): Simplify.
gcc/cp/
* mangle.c (write_type): When writing a function type with
function-cv-quals, don't add the unqualified type as a
substitution candidate.
From-SVN: r197460
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cp/mangle.c | 12 |
2 files changed, 16 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 9020dad..ef38bc2 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2013-04-03 Jason Merrill <jason@redhat.com> + + * mangle.c (write_type): When writing a function type with + function-cv-quals, don't add the unqualified type as a + substitution candidate. + 2013-04-03 Paolo Carlini <paolo.carlini@oracle.com> PR c++/56815 diff --git a/gcc/cp/mangle.c b/gcc/cp/mangle.c index 4e68c51..83c3e62 100644 --- a/gcc/cp/mangle.c +++ b/gcc/cp/mangle.c @@ -1897,8 +1897,16 @@ write_type (tree type) tree t = TYPE_MAIN_VARIANT (type); if (TREE_CODE (t) == FUNCTION_TYPE || TREE_CODE (t) == METHOD_TYPE) - t = build_ref_qualified_type (t, type_memfn_rqual (type)); - write_type (t); + { + t = build_ref_qualified_type (t, type_memfn_rqual (type)); + if (abi_version_at_least (8)) + /* Avoid adding the unqualified function type as a substitution. */ + write_function_type (t); + else + write_type (t); + } + else + write_type (t); } else if (TREE_CODE (type) == ARRAY_TYPE) /* It is important not to use the TYPE_MAIN_VARIANT of TYPE here |