Path: utzoo!utgpu!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!cwjcc!hal!nic.MR.NET!shamash!nis!viper!dave
From: dave@viper.Lynx.MN.Org (David Messer)
Newsgroups: comp.unix.microport
Subject: Re: Floating exception bug
Message-ID: <1675@viper.Lynx.MN.Org>
Date: 6 Dec 88 17:03:28 GMT
References: <1656@viper.Lynx.MN.Org> <171@nlgvax.UUCP>
Reply-To: dave@viper.Lynx.MN.Org (David Messer)
Organization: Lynx Data Systems, Eagan, MN
Lines: 24

In article <171@nlgvax.UUCP> geertj@nlgvax.UUCP (Geert Jan de Groot) writes:
 >In article <1656@viper.Lynx.MN.Org> dave@viper (David Messer) writes:
 >
 >Not true! Functions always return values on the stack, even if the value
 >isn't used. Thus, y() returns a double on the floating point stack.
 >But, main() doesn't remove it because of the wrong declaration. 
 >Thus, y() _must_ be declared double.

I've had many people point out to me (in boring detail :-) that the problem
is an inconsistent declaration.  Of course that is the problem!  What is
unacceptable to me is that a function in a _library_, whose definition
I may not of known, caused a problem which only showed up much later
in the execution of the program.  If I hadn't had the source to the
function in question, I never would've found it.

The program in question has compiled and executed correctly for many
years on a variety of UNIX systems -- it should've compiled and
executed correctly on Microport.
-- 
_____________________________________________________________________________
   __                     _ _ _              David Messer - Lynx Data Systems
  /  )              /    ' ) ) )                 dave@Lynx.MN.Org  -or-
 /  / __. , __o  __/      / / / _  _   _   _  __     ...{amdahl,hpda}!bungia!
/__/_(_/|_\\/ <__(_/_     / ' (_