PATCH: 64-bit uncleanliness fix

Matt Kraai kraai@alumni.carnegiemellon.edu
Sat Mar 17 16:43:00 GMT 2001


On Sat, Mar 17, 2001 at 01:48:43PM -0500, Brad Lucier wrote:
> One finds the following warnings on bootstrap on sparc-sun-solaris2.8
> with yesterday's trunk:
> 
> grep 'format.*arg.*arg' build.log
> ../../gcc/gcc/dwarf2out.c:1721: warning: int format, long int arg (arg 4)
> ../../gcc/gcc/dwarf2out.c:1721: warning: int format, long unsigned int arg (arg 4)
> ../../gcc/gcc/dwarf2out.c:1721: warning: int format, long unsigned int arg (arg 4)
> 
> I try to get rid of warnings like this because they can indicate
> real problems on 64-bit machines.  The following bootstraps on
> sparc-sun-solaris2.8.  If you like it, check it in.

A similar warning appears on i686-pc-linux-gnu.  I submitted a
patch earlier to eliminate this warning on i686-pc-linux-gnu by
changing the format string to use %u, and casting within the
macro.  I did this because all other users of this macro call it
with 0 or an unsigned int.  And, furthermore, the
ASM_GENERATE_INTERNAL_LABEL macro, which should generate the same
label name, already uses %u and performs the cast (in elfos.h, at
least).

Matt
-- 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE6tANdfNdgYxVXvBARAmqVAJ9aSvnAA71C5BiQ4+WWv6+FzxPwLACgsxYp
rN8nTvZRt9im91+38+hdnXg=
=D5R+
-----END PGP SIGNATURE-----


More information about the Gcc-patches mailing list