PROBLEM: "Floating exception" and GCC

From: Erik Nolf <nolf_at_petaxp.rug.ac.be>
Date: Mon, 27 Apr 1998 14:47:07 +0200

Hello Managers,


PROBLEM:
-------

I have a small problem concerning DEC Alpha's "Floating exception" and
the GNU C compiler. I prefer to use the GCC compiler for portability
to other machines and Unixes. Some other Unixes handle `denorms, NaNs
and infinities' by default and so does my code compiled with GCC.
However, on our DEC Alpha machine this is not the default procedure
and the use of any bad float results in a core dump. Nice but ugly!

We read raw images of type float: using the wrong endian, our
program dumps a core. Ofcourse, I would like to prevent this.

In fact, most users on our Alpha complain about this and now I am
looking for a solution to give. (because I like this machine a lot!)

The `cc` compiler provides the option `-ieee_with_inexact' but what
about the GCC compiler?

I looked for some options or little code and did find some "possible
solutions". Now I would be glad to read some advice of someone who
knows more about this.


QUESTION:
--------

How can I prevent the core dump in case of a "Floating exception" with GCC?



Thanks in advance,

        Erik-II



P.S.: Ofcourse I'll send a SUMMARY ...

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Erik Nolf email: Erik.Nolf_at_rug.ac.be
RUG-ELIS (MEDISIP) tel : +32-9-264.66.28
Proeftuinstraat 86 fax : +32-9-264.66.99
B-9000 Gent, Belgium www : http://petaxp.rug.ac.be/~nolf
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Received on Mon Apr 27 1998 - 14:51:40 NZST

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:37 NZDT