[Bug middle-end/23518] some gcc optimizations do not take overflow into account with -fwrapv
pinskia at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Mon Aug 22 19:56:00 GMT 2005
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-08-22 19:52 -------
Here is a java program (since -fwrapv is turned on by default for java front-end unlike the C front-end
since it is undefined in C and defined in java):
class t
{
public static void main(String as[])
{
int a;
a = Integer.MAX_VALUE;
if ((a < 0) || (a + 1 < 0)) {
System.out.println("Hello");
}
}
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23518
More information about the Gcc-bugs
mailing list