This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

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


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


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