This depends on the libc version. Seems you have 2.1. For me it's 2.2.
[root@sector17:/root/src]# cat fpu-exception.c
#define _GNU_SOURCE 1
#include <fenv.h>
main() {
double zero=0.0;
double one=1.0;
feenableexcept(FE_ALL_EXCEPT);
one /=zero;
}
[root@sector17:/root/src]# gcc -Wall -lm -o fpu-exception
fpu-exception.c
fpu-exception.c:4: warning: return type defaults to `int'
fpu-exception.c: In function `main':
fpu-exception.c:11: warning: control reaches end of non-void function
[root@sector17:/root/src]# ./fpu-exception
Floating point exception
[root@sector17:/root/src]#
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/