help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

FP (IEEE) exception trapping for Win2K (Cygwin) & Pentium 4 ?


From: Lionel B
Subject: FP (IEEE) exception trapping for Win2K (Cygwin) & Pentium 4 ?
Date: 23 Sep 2004 06:53:27 -0700

Greetings,

Using gcc (GCC) 3.3.3 (cygwin special) on Win2K, Pentium 4

Is it possible to enable FP (IEEE) exception trapping for Win2K,
Pentium 4 ?

(What I would really like to be able to do is to throw a C++ exception
when a FP exception is raised, and the only way I can think of doing
that is to trap FP exceptions and handle the SIGFPE signal).

I note that for some architectures gcc has flags to enable FP
exception traps (e.g. -mfp-trap-mode for DEC ALPHA), but no such flags
seem to exist for i386.

On a related point, I find that passing  -mfpmath=sse to gcc on my
architecture seems to disable the raising of FP exceptions; i.e.
fetestexcept() always returns 0, even when it ought not to. Anyone
come across this?

Grateful for any assistance,

-- 
Lionel B


reply via email to

[Prev in Thread] Current Thread [Next in Thread]