Date: Sun, 3 May 1998 16:00:18 -0700 (PDT) From: Craig Wilson <craig@natsoft.com.au> To: freebsd-bugs@FreeBSD.ORG Subject: Re: i386/3895 Message-ID: <199805032300.QAA22909@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR i386/3895; it has been noted by GNATS.
From: Craig Wilson <craig@natsoft.com.au>
To: ac199@hwcn.org
Cc: Eivind Eklund <eivind@FreeBSD.ORG>, ajhar@noao.edu,
bug-followup@FreeBSD.ORG
Subject: Re: i386/3895
Date: Mon, 04 May 1998 08:59:35 +1000
Tim Vanderhoek wrote:
>
> On Wed, 15 Apr 1998, Craig Wilson wrote:
>
> > > Synopsis: False FPE (floating point exception) signaled
> > >
> > > State-Changed-From-To: open-closed
> [...]
> > I have had this problem with the SCO Xenix C compiler.
> > It is reproducable with the C compiler in FreeBSD 2.2.2
> > It will happen when a routine which returns a float is not
> > properly defined in another source file that uses that routine.
>
> It happens when it's not properly defined, even if both are in
> the same source file. It is because when gcc sees getdouble() in
> main, getdouble() defaults to return int. Unfortunately,
> getdouble() actually returns a double.
>
> This isn't a bug in gcc. It is arguably a bug in the fortran
> compiler, since, from what I understand, that was what generated
> this code when fed bad code itself.
>
> The PR should remain closed.
>
I agree that it should remain closed.
I submitted the test C code to inform how the FPE is caused.
This problem is avoided by the correct use of prototypes etc.
Craig Wilson
National Software Pty. Ltd.
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199805032300.QAA22909>
