Re: XMIN(size_t, ssize_t) ?

From: Henrik Nordstrom <henrik_at_henriknordstrom.net>
Date: Sat, 17 May 2008 20:19:00 +0200

On tor, 2008-05-15 at 14:44 -0600, Alex Rousskov wrote:

> Interesting bug. FWIW, it looks like g++ automatically detects the above
> error and says:
> warning: comparison between signed and unsigned integer expressions

Should depend on compiler options..

`-Wsign-compare'
     Warn when a comparison between signed and unsigned values could
     produce an incorrect result when the signed value is converted to
     unsigned. This warning is also enabled by `-Wextra'; to get the
     other warnings of `-Wextra' without this warning, use `-Wextra
     -Wno-sign-compare'.

(from gcc 4.1.2 documentation)

I have this flag as a candidate warning flag in my build script, but not
activated as there is a bit of work to prune out the false alerts..

Regards
Henrik
Received on Sat May 17 2008 - 18:19:05 MDT

This archive was generated by hypermail 2.2.0 : Tue Aug 05 2008 - 01:06:35 MDT