aboutsummaryrefslogtreecommitdiff
path: root/gcc/df.h
diff options
context:
space:
mode:
authorMarek Polacek <polacek@redhat.com>2020-10-14 12:59:58 -0400
committerMarek Polacek <polacek@redhat.com>2020-10-15 11:17:22 -0400
commit08e712211efa4f969a64c69bdacf6ab45104a094 (patch)
tree6d0c834ab11719a8d7b94c5f9c866ebcb321063b /gcc/df.h
parentf2ff7d26722297558601fd943f8165a59833e8f9 (diff)
downloadgcc-08e712211efa4f969a64c69bdacf6ab45104a094.zip
gcc-08e712211efa4f969a64c69bdacf6ab45104a094.tar.gz
gcc-08e712211efa4f969a64c69bdacf6ab45104a094.tar.bz2
c++: Improve printing of pointers-to-members [PR97406, PR85901]
This PR points out that when printing the parameter mapping for a pointer-to-member-function, the output was truncated: [with T = void (X::*] Fixed by printing the abstract declarator for pointers-to-members in cxx_pretty_printer::type_id. So now we print: [with T = void (X::*)()] But when I tried a pointer-to-data-member, I got [with T = ‘offset_type’ not supported by simple_type_specifier)‘offset_type’ not supported by direct_abstract_declarator] so had to fix that too so that we now print: [with T = int X::*] or [with T = int (X::*)[5]] when the type is an array type. Which is what PR85901 was about. gcc/cp/ChangeLog: PR c++/97406 PR c++/85901 * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Handle OFFSET_TYPE. (cxx_pretty_printer::abstract_declarator): Fix the printing of ')'. (cxx_pretty_printer::direct_abstract_declarator): Handle OFFSET_TYPE. (cxx_pretty_printer::type_id): Likewise. Print the abstract declarator for pointers-to-members. gcc/testsuite/ChangeLog: PR c++/97406 PR c++/85901 * g++.dg/diagnostic/ptrtomem1.C: New test. * g++.dg/diagnostic/ptrtomem2.C: New test.
Diffstat (limited to 'gcc/df.h')
0 files changed, 0 insertions, 0 deletions