diff options
author | Jason Merrill <jason@redhat.com> | 2021-10-29 16:39:01 -0400 |
---|---|---|
committer | Jason Merrill <jason@redhat.com> | 2021-11-16 10:20:30 -0500 |
commit | 132f1c27770fa6dafdf14591878d301aedd5ae16 (patch) | |
tree | 2ce7efc1e98e0a34e73c685f731ac26d68b71656 /gcc/print-tree.c | |
parent | 11c4a06a6c1a9db0bfdb3ee8509392dd7163709c (diff) | |
download | gcc-132f1c27770fa6dafdf14591878d301aedd5ae16.zip gcc-132f1c27770fa6dafdf14591878d301aedd5ae16.tar.gz gcc-132f1c27770fa6dafdf14591878d301aedd5ae16.tar.bz2 |
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.
Diffstat (limited to 'gcc/print-tree.c')
-rw-r--r-- | gcc/print-tree.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/gcc/print-tree.c b/gcc/print-tree.c index d1fbd04..b5dc523 100644 --- a/gcc/print-tree.c +++ b/gcc/print-tree.c @@ -1004,8 +1004,7 @@ print_node (FILE *file, const char *prefix, tree node, int indent, break; default: - if (EXCEPTIONAL_CLASS_P (node)) - lang_hooks.print_xnode (file, node, indent); + lang_hooks.print_xnode (file, node, indent); break; } |