Optimiser bug in GCC 4.0.4
Q: When is (i != 0) equivalent to
((i >= 0) && ((i >= -1073741824) && (i < 1073741824)))
?
A: When GCC 4.0.4’s -O, -O1, -O2 or -O3 is used on it.
See GCC bug 28042. Particularly interesting is that removing the redundant set of parentheses around the second && avoids the optimiser bug.
Add comment June 16th, 2006 tonyg