This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Pathalogical divides
- To: dewar at gnat dot com, geoffk at cygnus dot com
- Subject: Re: Pathalogical divides
- From: dewar at gnat dot com (Robert Dewar)
- Date: Mon, 25 Sep 2000 08:18:19 -0400 (EDT)
- Cc: gcc at gcc dot gnu dot org, kenner at vlsi1 dot ultra dot nyu dot edu
<< If an _exceptional condition_ occurs during the evaluation of an
expression (that is, if the result is not mathematically defined or
not in the range of representable values for its type), the behaviour
is undefined.
>>
I don't think this applies, in this csae, the result IS mathematicaly
defined, and IS in the range of representable values for its type (and
in the case of %, all the posisble values allowed by the description
in the RM are in this category).
If you follow this argument, you would permit an implementation to
evaluate
a+b by adding a large number and then subtracting it, and would accept
it getting a signal in some cases.