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++/42810] Enumeration with sequential values has its for-loop exit condition optimized out.



------- Comment #17 from pinskia at gcc dot gnu dot org  2010-01-27 20:43 -------
> Your analogy is helpful, but a bit like comparing apples with oranges.  The
> reason being that the compiler executes integer overflow loops identically for
> all optimization settings.

Is it?  unsigned integers don't overflow by definition.  They wrap.  Now signed
integers overflow and change with different optimization levels.  That is what
I was trying to compare with this case, not unsigned integer wrapping.


-- 


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


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