(print_node{,_brief}): Use correct printf code to print INTEGER_CST if
authorRichard Kenner <kenner@gcc.gnu.org>
Sat, 30 Jul 1994 22:14:22 +0000 (18:14 -0400)
committerRichard Kenner <kenner@gcc.gnu.org>
Sat, 30 Jul 1994 22:14:22 +0000 (18:14 -0400)
HOST_WIDE_INT is wider than int.

From-SVN: r7838

gcc/print-tree.c

index f4f878f8b34c4cf4c073f55cb276a1a008cc750c..9b406fcb9a5a30f20e3ed58aee737bfb983d0bd7 100644 (file)
@@ -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