Floating point exceptions seem to have been turned off by default:
gonzo 13% uname -r
5.0-CURRENT
gonzo 14% cat a.c
double div(double x,double y) { return x/y; }
int main() { double x; x = div(1.0,0.0); printf("%f\n",x); }
gonzo 15% gcc -o a a.c
gonzo 16% ./a
Inf
This seems to produce an SIGFPE on 3.0, which I would have thought
was the correct thing to do:
walton 12% uname -r
3.4-STABLE
walton 13% cat a.c
double div(double x,double y) { return x/y; }
int main() { double x; x = div(1.0,0.0); printf("%f\n",x); }
walton 14% gcc -o a a.c
walton 15% ./a
Floating exception (core dumped)
There was a discussion on one of the list about what to do for
floating point excpetions recently, and I thought people decided
that causing a signal by default was a right thing? I presume this
was caused by the commit below?
David.
cracauer 2000/03/10 09:56:33 PST
Modified files:
sys/i386/include npx.h
Log:
Change the default FPU control word so that exceptions for new
processes are now masked until set by fpsetmask(3).
Submitted by: bde
Approved by: jkh, bde
Revision Changes Path
1.18 +5 -35 src/sys/i386/include/npx.h
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message