This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/23518] some gcc optimizations do not take overflow into account with -fwrapv


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]