From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: X-Archive-Original-Message-ID: <199712091702.KAA11080@ellpspace.math.ualberta.ca> Date: Tue, 9 Dec 1997 10:02:45 -0700 (MST) From: Michal Jaegermann Subject: Re: Ieee on linux/alpha In-Reply-To: Harvey J. Stein wrote: > > > This isn't working for me: > > hjstein@blaster:~/software/xlispstat-3-50$ cat test-zero.c > main() > { > double num = 1; > double denom = 0; > > ieee_set_fp_control(0); > return( (int) num/denom); > } > hjstein@blaster:~/software/xlispstat-3-50$ gcc test-zero.c -o test-zero > hjstein@blaster:~/software/xlispstat-3-50$ ./test-zero > Floating point exception (core dumped) First you apparently need -mieee flag. The second - at least in 4.2 division by zero does not seem to be affected on a box I tried; even if IEEE_TRAP_ENABLE_DZE bit is turned off. A bug or a processor property? BTW, using any kind of an optimization flag on this sample, at least with egcs compiler for Alpha, seems to make it to execute without exceptions. But a contents of main() is optimized out into a non-existence. :-) Michal -- To unsubscribe: send e-mail to axp-list-request@redhat.com with 'unsubscribe' as the subject. Do not send it to axp-list@redhat.com