Bug 1300

Summary: tc-arm.c:11073: warning: format '%08lX' expects type 'long unsigned int', but argument 4 has type 'offsetT'
Product: binutils Reporter: James Troup <james>
Component: gasAssignee: unassigned
Status: RESOLVED FIXED    
Severity: normal CC: bug-binutils
Priority: P2    
Version: 2.17   
Target Milestone: ---   
Host: arm-linux-gnu Target: arm-linux-gnu
Build: arm-linux-gnu Last reconfirmed:
Attachments: proposed patch

Description James Troup 2005-09-05 21:17:18 UTC
When compiling CVS HEAD 'all linux arches' enabled binutils on arm-linux-gnu, I
got the following error: 

gcc -DHAVE_CONFIG_H -I. -I../../gas -I. -D_GNU_SOURCE -I. -I../../gas -I../bfd
-I../../gas/config -I../../gas/../include -I../../gas/.. -I../../gas/../bfd
-I../../gas/../intl -I../intl -DLOCALEDIR="\"/usr/share/locale\""   -W -Wall
-Wstrict-prototypes -Wmissing-prototypes -Werror -g -O2 -c ../../gas/config/tc-arm.c
cc1: warnings being treated as errors
../../gas/config/tc-arm.c: In function 'md_apply_fix':
../../gas/config/tc-arm.c:11073: warning: format '%08lX' expects type 'long
unsigned int', but argument 4 has type 'offsetT'

This is gcc version: gcc (GCC) 4.0.2 20050821 (prerelease) (Debian 4.0.1-6)
running on Debian unstable.  NB: config/tc-arm.c compiled successfully when
compiling binutils targeted at arm-linux only.
Comment 1 James Troup 2005-12-07 04:49:44 UTC
Created attachment 780 [details]
proposed patch

This patch, by Lennert Buytenhek, is what we're using in Debian to work around
this problem.
Comment 2 Nick Clifton 2005-12-27 11:55:48 UTC
Patch approved and applied along with this ChangeLog entry.

gas/ChangeLog
2005-12-27  James Troup  <james@nocrew.org>

	PR 1300
	* config/tc-arm.c (md_apply_fix): Fix casts to match type in
	printf format.