Re: [PATCH] size_t is guaranteed unsigned by standards

From: Henrik Nordström <henrik_at_henriknordstrom.net>
Date: Mon, 10 Jan 2011 22:46:18 +0100

sön 2011-01-09 klockan 14:08 +1300 skrev Amos Jeffries:
> On 09/01/11 05:55, Kinkie wrote:
> > Hi all,
> > C99 and C++ standards mandate size_t to be unsigned; the attached
> > patch comments out a branch of code in compat/xstring.cc which tests
> > for a size_t argument being<0. This is caught by icc as an error.
> >
>
> IIRC Squid-3 will not build on compilers older than gcc-3.something anyway.
> So we can completely erase this whole piece of code.
>
> +1 from me.

+1 from me as well. The code in assumes size_t ís unsigned, ssize_t
signed.

Regards
Henrik
Received on Mon Jan 10 2011 - 21:46:24 MST

This archive was generated by hypermail 2.2.0 : Tue Jan 11 2011 - 12:00:06 MST