H
Harald van Dijk
Incidentally, where in the standard is "floating-point exception"
defined, and is it stated exactly what happens when a floating-point
exception is raised? A natural assumption would be that it raises the
signal SIGFPE but I can't find that explicitly stated.
7.6p1:
"A /floating-point status flag/ is a system variable whose value is set
(but never cleared) when a /floating-point exception/ is raised, which
occurs as a side effect of exceptional floating-point arithmetic to
provide auxiliary information."
Floating-point exception is in italics, meaning this is the definition of
the term, from which you can conclude that when a fp exception is raised,
the only thing that happens is a status flag is set.
Raising SIGFPE cannot be done by a conforming implementation (ignoring
calls to raise) unless the behaviour is already outside the scope of the
standard, in which case there is no requirement to raise SIGFPE.
("Warning: The posting profile's server doesn't carry newsgroup
"comp.compilers.lcc"." I've simply dropped it.)