new format warnings in cppinit.c and ggc-page.c

Zack Weinberg zack@codesourcery.com
Sat May 18 10:09:00 GMT 2002


On Sat, May 18, 2002 at 09:26:22AM +0100, Neil Booth wrote:
> Brad Lucier wrote:-
> 
> > ../../gcc/cppinit.c:877: warning: unsigned int format, different type arg (arg 4)
> > ../../gcc/cppinit.c:877: warning: unsigned int format, different type arg (arg 5)
> > ../../gcc/cppinit.c:897: warning: unsigned int format, different type arg (arg 4)
> > ../../gcc/cppinit.c:897: warning: unsigned int format, different type arg (arg 5)
> 
> Is there an ISO format specifier for size_t?  I couldn't find one.

It's simplest to cast size_t to unsigned long and use %l[ux].  I don't
believe we have any supported hosts where sizeof(size_t) > sizeof(long)
(and in fact there are good reasons why such an ABI should/will never 
happen).

zw



More information about the Gcc-bugs mailing list