Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 13 Jul 2003 12:11:25 -0600 (MDT)
From:      "M. Warner Losh" <imp@bsdimp.com>
To:        jilles@stack.nl
Cc:        freebsd-current@freebsd.org
Subject:   Re: GCC 3.3.1, new warnings with <limits>
Message-ID:  <20030713.121125.54936166.imp@bsdimp.com>
In-Reply-To: <20030713152154.GA96653@stack.nl>
References:  <20030713000559.28c18be6.kabaev@mail.ru> <20030713044331.GA89785@crodrigues.org> <20030713152154.GA96653@stack.nl>

next in thread | previous in thread | raw e-mail | index | archive | help
In message: <20030713152154.GA96653@stack.nl>
            Jilles Tjoelker <jilles@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030713.121125.54936166.imp>