Pathalogical divides

Robert Dewar dewar@gnat.com
Mon Sep 25 05:19:00 GMT 2000


<< 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.


More information about the Gcc mailing list