This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]