From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13019 invoked by alias); 28 Jan 2010 17:17:10 -0000 Received: (qmail 12637 invoked by uid 48); 28 Jan 2010 17:16:57 -0000 Date: Thu, 28 Jan 2010 17:17:00 -0000 Message-ID: <20100128171657.12636.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c++/42810] Enumeration with sequential values has its for-loop exit condition optimized out. In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "tony3 at GarlandConsulting dot us" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2010-01/txt/msg03249.txt.bz2 ------- 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