This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Fix thinko in int type pretty printing
- From: Richard Guenther <rguenther at suse dot de>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 5 Jul 2012 17:14:26 +0200 (CEST)
- Subject: [PATCH] Fix thinko in int type pretty printing
I should have consulted docs.
Bootstrapped and tested on x86_64-unknown-linux-gnu, applied.
Richard.
2012-07-05 Richard Guenther <rguenther@suse.de>
* tree-pretty-print.c (dump_generic_node): Properly test
the result of exact_log2.
Index: gcc/tree-pretty-print.c
===================================================================
*** gcc/tree-pretty-print.c (revision 189288)
--- gcc/tree-pretty-print.c (working copy)
*************** dump_generic_node (pretty_printer *buffe
*** 743,749 ****
? "unsigned long long"
: "signed long long"));
else if (TYPE_PRECISION (node) >= CHAR_TYPE_SIZE
! && exact_log2 (TYPE_PRECISION (node)))
{
pp_string (buffer, (TYPE_UNSIGNED (node) ? "uint" : "int"));
pp_decimal_int (buffer, TYPE_PRECISION (node));
--- 743,749 ----
? "unsigned long long"
: "signed long long"));
else if (TYPE_PRECISION (node) >= CHAR_TYPE_SIZE
! && exact_log2 (TYPE_PRECISION (node)) != -1)
{
pp_string (buffer, (TYPE_UNSIGNED (node) ? "uint" : "int"));
pp_decimal_int (buffer, TYPE_PRECISION (node));