summaryrefslogtreecommitdiff
path: root/gcc/print-tree.c
diff options
context:
space:
mode:
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>1994-07-30 22:14:22 +0000
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>1994-07-30 22:14:22 +0000
commitb9f6f285e6b4753aa3477b1f360ec86f9897b1ed (patch)
tree6051daf46582b1dad597a8648fa82452a9130632 /gcc/print-tree.c
parentbe382d7bda6a77fc85a63b409517903fc69ae3da (diff)
downloadgcc-b9f6f285e6b4753aa3477b1f360ec86f9897b1ed.tar.gz
(print_node{,_brief}): Use correct printf code to print INTEGER_CST if
HOST_WIDE_INT is wider than int. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@7838 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/print-tree.c')
-rw-r--r--gcc/print-tree.c32
1 files changed, 28 insertions, 4 deletions
diff --git a/gcc/print-tree.c b/gcc/print-tree.c
index f4f878f8b34..9b406fcb9a5 100644
--- a/gcc/print-tree.c
+++ b/gcc/print-tree.c
@@ -109,10 +109,22 @@ print_node_brief (file, prefix, node, indent)
fprintf (file, " overflow");
if (TREE_INT_CST_HIGH (node) == 0)
- fprintf (file, " %1u", TREE_INT_CST_LOW (node));
+ fprintf (file,
+#if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_INT
+ " %1u",
+#else
+ " %1lu",
+#endif
+ TREE_INT_CST_LOW (node));
else if (TREE_INT_CST_HIGH (node) == -1
&& TREE_INT_CST_LOW (node) != 0)
- fprintf (file, " -%1u", -TREE_INT_CST_LOW (node));
+ fprintf (file,
+#if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_INT
+ " -%1u",
+#else
+ " -%1lu",
+#endif
+ -TREE_INT_CST_LOW (node));
else
fprintf (file,
#if HOST_BITS_PER_WIDE_INT == 64
@@ -558,10 +570,22 @@ print_node (file, prefix, node, indent)
fprintf (file, " overflow");
if (TREE_INT_CST_HIGH (node) == 0)
- fprintf (file, " %1u", TREE_INT_CST_LOW (node));
+ fprintf (file,
+#if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_INT
+ " %1u",
+#else
+ " %1lu",
+#endif
+ TREE_INT_CST_LOW (node));
else if (TREE_INT_CST_HIGH (node) == -1
&& TREE_INT_CST_LOW (node) != 0)
- fprintf (file, " -%1u", -TREE_INT_CST_LOW (node));
+ fprintf (file,
+#if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_INT
+ " -%1u",
+#else
+ " -%1lu",
+#endif
+ -TREE_INT_CST_LOW (node));
else
fprintf (file,
#if HOST_BITS_PER_WIDE_INT == 64