fix a gas error message

Alan Modra amodra@bigpond.net.au
Mon Sep 13 00:48:00 GMT 2004


Seen on powerpc-linux gas compiled with a 64-bit bfd.  Passing a 64-bit
offsetT to printf and expecting %d to print something sensible doesn't
work..

gas/ChangeLog
	* messages.c (as_internal_value_out_of_range): Cast values passed
	to as_bad_where or as_warn_where to proper type.

Index: gas/messages.c
===================================================================
RCS file: /cvs/src/src/gas/messages.c,v
retrieving revision 1.9
diff -u -p -r1.9 messages.c
--- gas/messages.c	6 May 2004 11:01:48 -0000	1.9
+++ gas/messages.c	13 Sep 2004 00:44:56 -0000
@@ -534,9 +534,11 @@ as_internal_value_out_of_range (char *  
       err = _("%s out of range (%d is not between %d and %d)");
 
       if (bad)
-	as_bad_where (file, line, err, prefix, val, min, max);
+	as_bad_where (file, line, err,
+		      prefix, (int) val, (int) min, (int) max);
       else
-	as_warn_where (file, line, err, prefix, val, min, max);
+	as_warn_where (file, line, err,
+		       prefix, (int) val, (int) min, (int) max);
     }
 #ifdef BFD_ASSEMBLER
   else

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre



More information about the Binutils mailing list