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: 28 Jan 2010 17:16:57 -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 #23 from tony3 at GarlandConsulting dot us 2010-01-28 17:16 -------
Jonathan,
Thanks for explaining that operation outside the norm is unspecified such
that the compiler can do anything and everything.
>I think a warning for this would be helpful, but asking for the compiler to
>assume types can have values that they can't have is not a good idea.
In the absence of making enumerations more useful (in the standard--which is
unlikely), I completely agree: a warning would be helpful.
Enough said by me.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42810