From owner-freebsd-arch@FreeBSD.ORG Sun Nov 16 03:12:14 2003 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6D5C016A4CE for ; Sun, 16 Nov 2003 03:12:14 -0800 (PST) Received: from gw.celabo.org (gw.celabo.org [208.42.49.153]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8C36643FA3 for ; Sun, 16 Nov 2003 03:12:13 -0800 (PST) (envelope-from nectar@celabo.org) Received: from madman.celabo.org (madman.celabo.org [10.0.1.111]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "madman.celabo.org", Issuer "celabo.org CA" (verified OK)) by gw.celabo.org (Postfix) with ESMTP id 0CCC95482B; Sun, 16 Nov 2003 05:12:13 -0600 (CST) Received: by madman.celabo.org (Postfix, from userid 1001) id 9B0976D455; Sun, 16 Nov 2003 05:12:12 -0600 (CST) Date: Sun, 16 Nov 2003 05:12:12 -0600 From: "Jacques A. Vidrine" To: Terry Lambert , freebsd-arch@freebsd.org Message-ID: <20031116111212.GA55844@madman.celabo.org> Mail-Followup-To: "Jacques A. Vidrine" , Terry Lambert , freebsd-arch@freebsd.org References: <20031114194119.GA94198@madman.celabo.org> <3FB6AA8F.37ED6D50@mindspring.com> <20031116102010.GA53282@madman.celabo.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20031116102010.GA53282@madman.celabo.org> X-Url: http://www.celabo.org/ User-Agent: Mutt/1.5.4i-ja.1 Subject: Re: __TIME_MIN/__TIME_MAX X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Nov 2003 11:12:14 -0000 On Sun, Nov 16, 2003 at 04:20:10AM -0600, Jacques A. Vidrine wrote: > /* How can this be implemented correctly? */ > int range_error(long n, time_t t) > { > return (long)(t = n) == n; > } Hrmp. Because time_t is probably signed, technically this can cause `undefined behavior' if the range of `long' is more than the range of `time_t' (e.g. on alpha). *sigh* All I really want to do is correct a parsing bug and at the same time eliminate a warning so that I can set WARNS?=1 in libc before the code freeze. Cheers, -- Jacques Vidrine NTT/Verio SME FreeBSD UNIX Heimdal nectar@celabo.org jvidrine@verio.net nectar@freebsd.org nectar@kth.se