This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/5277] NaN unexpectedly
- From: "hfricke at hdz-nrw dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 18 Jun 2003 07:38:29 -0000
- Subject: [Bug c/5277] NaN unexpectedly
- References: <20020104110600.5277.long@stsci.edu>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=5277
------- Additional Comments From hfricke at hdz-nrw dot de 2003-06-18 07:38 -------
I'd be grateful if somebody could look into this problem again. On i386 random
floating-point math failures occur after calling a routine returning double if
the routine has been declared to return int in the calling program. I completely
agree that this is a programming error. Nevertheless the compiler should not
generate code that fails in seemingly unrelated places, obscuring the problem.
If you cannot fix it or do not want to fix it, please document the problem at
least. A notice like "Calling a routine with the return type declared
incorrectly will cause your program to fail in mysterious ways, yielding -NaN
for floating-point operations in random places. We decided to make it this way
to punish you as hard as possible for making this kind of error." in the
appropriate section of the documentation would have saved me two weeks of work