integer op= floating evaluated incorrectly by C compiler
Jay Zelitzky
myunive at nsc.UUCP
Sat Jan 14 12:01:35 AEST 1984
..........
Everyone has been missing another case where there is a problem:
int /= unsigned; will do an integer divide instead of the correct
unsigned divide. This will result in a different value in some cases.
For example: (2^32-1)/2 will equal some large number if the division is
done unsigned and 0 if the division is signed.
A slight variation of the previously posted fix will also fix this case.
Jay Zelitzky
{menlo70,fortune}!nsc!myunive
More information about the Net.bugs.usg
mailing list