From owner-freebsd-hackers Thu Dec 23 9:15: 9 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by hub.freebsd.org (Postfix) with SMTP id 25BFA15410 for ; Thu, 23 Dec 1999 09:15:07 -0800 (PST) (envelope-from dwmalone@maths.tcd.ie) Received: from gosset.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id ; 23 Dec 1999 17:14:58 +0000 (GMT) Date: Thu, 23 Dec 1999 17:14:55 +0000 From: David Malone To: Sheldon Hearn Cc: hackers@FreeBSD.org Subject: Re: SIGFPE on arithmetic overflow Message-ID: <19991223171455.A27721@gosset.maths.tcd.ie> References: <52627.945956617@axl.noc.iafrica.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre3i In-Reply-To: <52627.945956617@axl.noc.iafrica.com> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Thu, Dec 23, 1999 at 03:43:37PM +0200, Sheldon Hearn wrote: > The following code, compiled on a stock FreeBSD 4.0-CURRENT machine > cores on SIGFPE. On a NetBSD 1.4.1 machine (gcc-2.91.60), the program > prints the value of INT_MAX. Try adding a fpsetmask(fpgetmask()&(~FP_X_OFL)); before the calculation and see what happens. David. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message