aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/c-family/ChangeLog6
-rw-r--r--gcc/c-family/c-pretty-print.c4
2 files changed, 9 insertions, 1 deletions
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog
index 10a9ddd..2746d04 100644
--- a/gcc/c-family/ChangeLog
+++ b/gcc/c-family/ChangeLog
@@ -1,3 +1,9 @@
+2012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/51777
+ * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
+ use pp_unsigned_wide_integer.
+
2012-01-10 Richard Guenther <rguenther@suse.de>
PR middle-end/51806
diff --git a/gcc/c-family/c-pretty-print.c b/gcc/c-family/c-pretty-print.c
index be28b39..dc63f00 100644
--- a/gcc/c-family/c-pretty-print.c
+++ b/gcc/c-family/c-pretty-print.c
@@ -910,8 +910,10 @@ pp_c_integer_constant (c_pretty_printer *pp, tree i)
? TYPE_CANONICAL (TREE_TYPE (i))
: TREE_TYPE (i);
- if (TREE_INT_CST_HIGH (i) == 0)
+ if (host_integerp (i, 0))
pp_wide_integer (pp, TREE_INT_CST_LOW (i));
+ else if (host_integerp (i, 1))
+ pp_unsigned_wide_integer (pp, TREE_INT_CST_LOW (i));
else
{
unsigned HOST_WIDE_INT low = TREE_INT_CST_LOW (i);