diff options
author | David E. O'Brien <obrien@FreeBSD.org> | 2002-02-06 05:07:17 +0000 |
---|---|---|
committer | David E. O'Brien <obrien@FreeBSD.org> | 2002-02-06 05:07:17 +0000 |
commit | 3905f1c147f1342b600a9e0b4eba22b320321622 (patch) | |
tree | 169487593d8820fde6847e0d9e529f434540d91f /contrib/gcc/cp/ptree.c | |
parent | 34edb80c8028bec6791df5d3f6ced6ee39a75312 (diff) |
A slightly more general version of rev 1.2 that might be more acceptable
to the GCC maintainers.
Notes
Notes:
svn path=/head/; revision=90291
Diffstat (limited to 'contrib/gcc/cp/ptree.c')
-rw-r--r-- | contrib/gcc/cp/ptree.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/contrib/gcc/cp/ptree.c b/contrib/gcc/cp/ptree.c index 80ea80a97a05..f6a7f1c78828 100644 --- a/contrib/gcc/cp/ptree.c +++ b/contrib/gcc/cp/ptree.c @@ -28,6 +28,13 @@ Boston, MA 02111-1307, USA. */ #include "tree.h" #include "cp-tree.h" +#ifndef HOST_PTR_PRINTF_FORMAT +#define HOST_PTR_PRINTF_FORMAT HOST_PTR_PRINTF +#endif +#ifndef HOST_PTR_PRINTF_TYPE +#define HOST_PTR_PRINTF_TYPE (void *) +#endif + void cxx_print_decl (file, node, indent) FILE *file; @@ -51,19 +58,19 @@ cxx_print_decl (file, node, indent) && DECL_PENDING_INLINE_INFO (node)) { fprintf (file, " pending-inline-info "); - fprintf (file, HOST_PTR_PRINTF, (void *) DECL_PENDING_INLINE_INFO (node)); + fprintf (file, HOST_PTR_PRINTF_FORMAT, HOST_PTR_PRINTF_TYPE DECL_PENDING_INLINE_INFO (node)); } if (TREE_CODE (node) == TYPE_DECL && DECL_SORTED_FIELDS (node)) { fprintf (file, " sorted-fields "); - fprintf (file, HOST_PTR_PRINTF, (void *) DECL_SORTED_FIELDS (node)); + fprintf (file, HOST_PTR_PRINTF_FORMAT, HOST_PTR_PRINTF_TYPE DECL_SORTED_FIELDS (node)); } if ((TREE_CODE (node) == FUNCTION_DECL || TREE_CODE (node) == VAR_DECL) && DECL_TEMPLATE_INFO (node)) { fprintf (file, " template-info "); - fprintf (file, HOST_PTR_PRINTF, (void *) DECL_TEMPLATE_INFO (node)); + fprintf (file, HOST_PTR_PRINTF_FORMAT, HOST_PTR_PRINTF_TYPE DECL_TEMPLATE_INFO (node)); } } @@ -184,7 +191,7 @@ cxx_print_xnode (file, node, indent) { case CPLUS_BINDING: fprintf (file, " scope "); - fprintf (file, HOST_PTR_PRINTF, BINDING_SCOPE (node)); + fprintf (file, HOST_PTR_PRINTF_FORMAT, HOST_PTR_PRINTF_TYPE BINDING_SCOPE (node)); print_node (file, "value", BINDING_VALUE (node), indent+4); print_node (file, "chain", TREE_CHAIN (node), indent+4); break; |