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.
if (tree message = STATIC_ASSERT_MESSAGE (node))
print_node (file, "message", message, indent+4);
break;
+ case PTRMEM_CST:
+ print_node (file, "member", PTRMEM_CST_MEMBER (node), indent+4);
+ break;
default:
break;
}
void (*print_statistics) (void);
/* Called by print_tree when there is a tree of class tcc_exceptional
- that it doesn't know how to display. */
+ or tcc_constant that it doesn't know how to display. */
lang_print_tree_hook print_xnode;
/* Called to print language-dependent parts of tcc_decl, tcc_type,
break;
default:
- if (EXCEPTIONAL_CLASS_P (node))
- lang_hooks.print_xnode (file, node, indent);
+ lang_hooks.print_xnode (file, node, indent);
break;
}