Floating exception bug

David Messer dave at viper.Lynx.MN.Org
Wed Dec 7 03:03:28 AEST 1988


In article <171 at nlgvax.UUCP> geertj at nlgvax.UUCP (Geert Jan de Groot) writes:
 >In article <1656 at viper.Lynx.MN.Org> dave at 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 at Lynx.MN.Org  -or-
 /  / __. , __o  __/      / / / _  _   _   _  __     ...{amdahl,hpda}!bungia!
/__/_(_/|_\\/ <__(_/_     / ' (_</_/_)_/_)_</_/ (_                 viper!dave



More information about the Comp.unix.microport mailing list