summaryrefslogtreecommitdiffstats
path: root/contrib/gcc
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2002-02-06 05:07:17 +0000
committerobrien <obrien@FreeBSD.org>2002-02-06 05:07:17 +0000
commit3e10a6d863dab6d9b943252ef04420351b58d575 (patch)
tree169487593d8820fde6847e0d9e529f434540d91f /contrib/gcc
parentfecfd9c3981835694a9aac2cf2886c2ec485cdf9 (diff)
downloadFreeBSD-src-3e10a6d863dab6d9b943252ef04420351b58d575.zip
FreeBSD-src-3e10a6d863dab6d9b943252ef04420351b58d575.tar.gz
A slightly more general version of rev 1.2 that might be more acceptable
to the GCC maintainers.
Diffstat (limited to 'contrib/gcc')
-rw-r--r--contrib/gcc/cp/ptree.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/contrib/gcc/cp/ptree.c b/contrib/gcc/cp/ptree.c
index 80ea80a..f6a7f1c 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;
OpenPOWER on IntegriCloud