Skip site navigation (1)Skip section navigation (2)
Date:        Sat, 4 Nov 2000 16:30:14 +0100
From:      Erik Trulsson <ertr1013@student.uu.se>
To:        freebsd-stable@freebsd.org
Subject:   Re: /usr/include/machine/limits.h
Message-ID:  <20001104163014.A2586@student.uu.se>
In-Reply-To: <Pine.BSF.4.21.0011041528290.32594-100000@reticent.troll.no>; from bhughes@trolltech.com on Sat, Nov 04, 2000 at 03:29:43PM %2B0100
References:  <Pine.BSF.4.21.0011041523230.17094-100000@reticent.troll.no> <Pine.BSF.4.21.0011041528290.32594-100000@reticent.troll.no>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Nov 04, 2000 at 03:29:43PM +0100, Bradley T. Hughes wrote:
> On Sat, 4 Nov 2000, Bradley T. Hughes wrote:
> 
> > when assigning SHRT_MIN to a short (ie. short foo = SHRT_MIN;) gcc
> > complains:
> > 
> > warning: overflow in implicit constant conversion
> > 
> > SHRT_MIN is defined as (-0x7fff - 1) (seems pretty correct to me)...
> 
> actually... i miss counted f's :
> 
> #define SHRT_MIN        (-0x7ffff - 1)  /* min value for a short */
> 

That definitely looks like one 'f' too many.
It ought to be (-0x7fff -1)
(Especially since SHRT_MAX is defined as 0x7fff.)
Looks like a bug in the include file to me.

-- 
<Insert your favourite quote here.>
Erik Trulsson
ertr1013@student.uu.se



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




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