]> git.ipfire.org Git - thirdparty/gcc.git/commit
c++: improve print_node of PTRMEM_CST
authorJason Merrill <jason@redhat.com>
Fri, 29 Oct 2021 20:39:01 +0000 (16:39 -0400)
committerJason Merrill <jason@redhat.com>
Tue, 16 Nov 2021 15:20:30 +0000 (10:20 -0500)
commit132f1c27770fa6dafdf14591878d301aedd5ae16
tree2ce7efc1e98e0a34e73c685f731ac26d68b71656
parent11c4a06a6c1a9db0bfdb3ee8509392dd7163709c
c++: improve print_node of PTRMEM_CST

It's been inconvenient that pretty-printing of PTRMEM_CST didn't display
what member the constant refers to.

Adding that is complicated by the absence of a langhook for CONSTANT_CLASS_P
nodes; the simplest fix for that is to use the tcc_exceptional hook for
tcc_constant as well.

gcc/cp/ChangeLog:

* ptree.c (cxx_print_xnode): Handle PTRMEM_CST.

gcc/ChangeLog:

* langhooks.h (struct lang_hooks): Adjust comment.
* print-tree.c (print_node): Also call print_xnode hook for
tcc_constant class.
gcc/cp/ptree.c
gcc/langhooks.h
gcc/print-tree.c