floating point constant folding

Blair P. Houghton bhoughto at cmdnfs.intel.com
Fri Nov 16 02:33:37 AEST 1990


In article <1990Nov14.192231.29728 at athena.mit.edu> jfc at athena.mit.edu (John F Carr) writes:
>In article <1990Nov13.174025.1520 at zoo.toronto.edu>
>	henry at zoo.toronto.edu (Henry Spencer) writes:
>>Observable results include overflow exceptions and the values
>>of data items written out to files.
>
>Overflows of types other than unsigned integers are undefined, so a

Almost threw me there.  The standard defines unsigned
integers as being unable to overflow; the excess bits are
simply lost and the effect is that of 'result mod 2^n, n =
number of bits in an unsigned integer' (cf. ANSI X3.159-1989,
sec. 3.1.2.5., p. 24, ll. 5-9).  It doesn't _explicitly_
state that overflow for other types is undefined.  That
comes from the explicit undefinedness of the effect of any
exception during expression evaluation (ibid., sec. 3.3,
p. 39, ll.  15-7).

				--Blair
				  "Just wanted to clear that up."



More information about the Comp.std.c mailing list