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, ira] Make ira printf type correct


I tried to bootstrap the ira compiler on a 32-bit Red Hat system, and it did
not bootstrap due to a type conflict between a fprintf that used %ld to print
out types that are int.  This patch fixes the immediate problem, but perhaps it
is better to cast the types to long before doing the multiplies in case of
overflow.

2008-06-10  Michael Meissner  <michael.meissner@amd.com>

	* ira-conflicts.c (build_conflict_bit_table): Make tracing fprintf
	type correct.

Index: gcc/ira-conflicts.c
===================================================================
--- gcc/ira-conflicts.c	(revision 136625)
+++ gcc/ira-conflicts.c	(working copy)
@@ -112,7 +112,7 @@ build_conflict_bit_table (void)
   if (internal_flag_ira_verbose > 0 && ira_dump_file != NULL)
     fprintf
       (ira_dump_file,
-       "+++Allocating %ld bytes for conflict table (uncompressed size %ld)\n",
+       "+++Allocating %u bytes for conflict table (uncompressed size %u)\n",
        allocated_words_num * sizeof (INT_TYPE),
        allocno_set_words * allocnos_num * sizeof (INT_TYPE));
   for (i = 0; i < max_point; i++)


-- 
Michael Meissner, AMD
90 Central Street, MS 83-29, Boxborough, MA, 01719, USA
michael.meissner@amd.com


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