linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* min/max and all that jazz
@ 2001-09-19  9:59 Duncan Sands
  2001-09-19 18:55 ` Bruce Harada
  0 siblings, 1 reply; 2+ messages in thread
From: Duncan Sands @ 2001-09-19  9:59 UTC (permalink / raw)
  To: linux-kernel

gcc has a warning option -Wsign-compare (not turned on by -Wall):

`-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 `-W'; to get the other
     warnings of `-W' without this warning, use `-W -Wno-sign-compare'.

This might pick up some errors of the kind the new min/max macros
are trying to catch...

Duncan.

PS: please CC any comments to me, since I'm not subscribed to the list.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: min/max and all that jazz
  2001-09-19  9:59 min/max and all that jazz Duncan Sands
@ 2001-09-19 18:55 ` Bruce Harada
  0 siblings, 0 replies; 2+ messages in thread
From: Bruce Harada @ 2001-09-19 18:55 UTC (permalink / raw)
  To: Duncan Sands; +Cc: linux-kernel

On Wed, 19 Sep 2001 11:59:17 +0200
Duncan Sands <duncan.sands@math.u-psud.fr> wrote:

> gcc has a warning option -Wsign-compare (not turned on by -Wall):

[SNIP]

> This might pick up some errors of the kind the new min/max macros
> are trying to catch...
>
> PS: please CC any comments to me, since I'm not subscribed to the list.

Apparently not... During the big flamefest over min()/max(), Linus expressed a
fairly clear dislike for -Wsign-compare ;)


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-09-19 18:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-09-19  9:59 min/max and all that jazz Duncan Sands
2001-09-19 18:55 ` Bruce Harada

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).