re PR c++/51777 (Errors message show unsigned long template parameters as signed)

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.

From-SVN: r183238
This commit is contained in:
Paolo Carlini 2012-01-17 11:05:20 +00:00 committed by Paolo Carlini
parent e6fa9204e6
commit 465406bec1
2 changed files with 9 additions and 1 deletions

View file

@ -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

View file

@ -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);