GCC 2.95 and floating point precision
Stephen L Moshier
moshier@mediaone.net
Sun Aug 8 07:25:00 GMT 1999
GCC-2.95 is more sensitive than any previous GCC version has been
to the floating point pointer aliasing feature-bug of ANSI C.
The program you referenced contains code that is not valid ANSI C,
such as the following:
long double ChopVar;
*Lo = *((unsigned long int *) &ChopVar);
*Hi = (*(((unsigned long int *) &ChopVar) + 1)) & ~2147483648U;
You may not do this any more. It is verboten. You are supposed to use
a union containing the float and the int together.
More information about the Gcc
mailing list