Re: GCC 3.3.1, new warnings with <limits>

From: M. Warner Losh <imp_at_bsdimp.com>
Date: Sun, 13 Jul 2003 12:11:25 -0600 (MDT)
In message: <20030713152154.GA96653_at_stack.nl>
            Jilles Tjoelker <jilles_at_stack.nl> writes:
: The compiler moans about (T)(-1) >= 0 as well. Is the assumption that
: (unsigned type)(-1) is never zero valid?

yes.  There are no known machines where -1 == 0 for types of different
signs.  Further, the C standard says that it must behave as if it is a
two's complement machine, and I think that C++ says so too.

Warner
Received on Sun Jul 13 2003 - 09:11:36 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:15 UTC