From owner-freebsd-stable@FreeBSD.ORG Wed Dec 22 12:26:14 2004 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6BC9016A4CE for ; Wed, 22 Dec 2004 12:26:14 +0000 (GMT) Received: from mail.ticketswitch.com (mail.ticketswitch.com [194.200.93.188]) by mx1.FreeBSD.org (Postfix) with ESMTP id 16D8F43D53 for ; Wed, 22 Dec 2004 12:26:14 +0000 (GMT) (envelope-from petefrench@ticketswitch.com) Received: from [172.16.1.6] (helo=dilbert.firstcallgroup.co.uk) by mail.ticketswitch.com with esmtp (Exim 4.32; FreeBSD) id 1Ch5Z6-0000nW-0s; Wed, 22 Dec 2004 12:26:04 +0000 Received: from petefrench by dilbert.firstcallgroup.co.uk with local (Exim 4.42 (FreeBSD)) id 1Ch5Z5-000FuI-TV; Wed, 22 Dec 2004 12:26:03 +0000 To: ertr1013@student.uu.se, petefrench@ticketswitch.com In-Reply-To: <20041221192924.GA27658@falcon.midgard.homeip.net> Message-Id: From: Pete French Date: Wed, 22 Dec 2004 12:26:03 +0000 cc: brett@lariat.org cc: stable@freebsd.org cc: colin.percival@wadham.ox.ac.uk Subject: Re: Will there be a 5.3.1? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Dec 2004 12:26:14 -0000 > Buggy compilers are indefensible, yes, but why try to apologise for it? I dont see it as a bug. Without an 'L' the right hand side of that expression is a 16 bit int. For which 65536 is out of range. If I wrote 'int y = 65535; long x = y;' then I would get the same result for the same reason. The correct line is 'long x = 65535L;' which specifies that the constant is a long. In fact aren't situations like this the precise reason for having the 'L' as part of the language ? > 'long x = 65535;' will not set x to -1, even with 16-bit ints. It will and does on certain compilers unfortunately. -pcf.