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 c/18700] Infinite loop with ranged for() loop


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-11-28 05:27 -------
In C, ((int)INT_MAX) + 1 is undefined and int does not wrap.  
For 3.4.0 and above if you want int to wrap use the flap -fwrapv.
Otherwise use unsigned where wrapping is defined.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18700


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