This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/42810] Enumeration with sequential values has its for-loop exit condition optimized out.
- From: "tony3 at GarlandConsulting dot us" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Jan 2010 23:05:08 -0000
- Subject: [Bug c++/42810] Enumeration with sequential values has its for-loop exit condition optimized out.
- References: <bug-42810-18694@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #6 from tony3 at GarlandConsulting dot us 2010-01-19 23:05 -------
There is a related bug here:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36170
But unlike that bug which uses an out-of-range enum value, this case does not.
We are testing 'value <= max_valid_enum_value'. So I've entered this as a
different bug for reconsideration about how the compiler is handling valid
enumeration values in -O2.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42810