This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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]

PR 5026 fix


On Mon, Sep 17, 2007 at 04:34:47PM -0000, nickc@sourceware.org wrote:
> 	PR gas/5026
> 	* read.c (emit_expr): Use unsigned long long values in warning message about
> 	truncated expressions.

Have we decided to require a compiler with long long, even for 32-bit
host/target?

	PR gas/5026
	* read.c (emit_expr): Only use long long if required and available.

Index: gas/read.c
===================================================================
RCS file: /cvs/src/src/gas/read.c,v
retrieving revision 1.129
diff -u -p -r1.129 read.c
--- gas/read.c	17 Sep 2007 16:34:47 -0000	1.129
+++ gas/read.c	18 Sep 2007 00:23:22 -0000
@@ -4106,8 +4106,13 @@ emit_expr (expressionS *exp, unsigned in
 	  && ((get & mask) != mask
 	      || (get & hibit) == 0))
 	{		/* Leading bits contain both 0s & 1s.  */
+#if defined (BFD64) && BFD_HOST_64BIT_LONG_LONG
 	  as_warn (_("value 0x%llx truncated to 0x%llx"),
 		   (unsigned long long) get, (unsigned long long) use);
+#else
+	  as_warn (_("value 0x%lx truncated to 0x%lx"),
+		   (unsigned long) get, (unsigned long) use);
+#endif
 	}
       /* Put bytes in right order.  */
       md_number_to_chars (p, use, (int) nbytes);

-- 
Alan Modra
Australia Development Lab, IBM


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