[PATCH] Fix thinko in int type pretty printing

Richard Guenther rguenther@suse.de
Thu Jul 5 15:14:00 GMT 2012


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



More information about the Gcc-patches mailing list