This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Relaxing -Wsign-compare
On 21-Sep-2001, Richard Henderson <rth@redhat.com> wrote:
> On Fri, Sep 21, 2001 at 05:48:31PM -0000, Morten Welinder wrote:
> > With "int", the program is perfectly fine and portable. With "size_t",
> > it isn't, if I understand things right. There's no guarantee that "%d"
> > matches size_t.
>
> So use %z, which does match size_t.
That's not portable.
--
Fergus Henderson <fjh@cs.mu.oz.au> | "I have always known that the pursuit
The University of Melbourne | of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh> | -- the last words of T. S. Garp.