[Bug middle-end/30364] [4.1/4.2/4.3 Regression] Wrong variable ranges due to constant folding
pinskia at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Fri Jan 5 19:58:00 GMT 2007
------- Comment #6 from pinskia at gcc dot gnu dot org 2007-01-05 19:58 -------
(In reply to comment #5)
> Do the parenthesis matter in C? They do matter in say Fortran, but in C I
> think
> (a - 20) + (b - 20) can be evaluated as (a + b) + (-20 + -20) or a - 20 - 20 +
> b
> etc.
In fact, a-20 + c will be valid even if a+c overflows but (a-20) + c does not.
There are comments in the standard somewhere which makes a mention of this.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30364
More information about the Gcc-bugs
mailing list