From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30300 invoked by alias); 13 Nov 2007 04:56:04 -0000 Received: (qmail 30267 invoked by uid 48); 13 Nov 2007 04:55:56 -0000 Date: Tue, 13 Nov 2007 04:56:00 -0000 Message-ID: <20071113045556.30266.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c++/33738] -Wtype-limits misses a warning when comparing enums In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "manu at gcc dot gnu dot org" 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: 2007-11/txt/msg01138.txt.bz2 ------- Comment #2 from manu at gcc dot gnu dot org 2007-11-13 04:55 ------- (In reply to comment #1) > Warnings from optimizers are semi a no-no. Yes we have them for strict > aliasing and overflow but I think those cases are a bit weird. This is > unspecified behavior no matter what and there is no flag to change the behavior > here. Well, Wtype-limits is supposed to warn about this and it doesn't. Can we do it from the front-end? If not, then warning from the middle-end seems the right thing to do as long as it is not complex/intrusive. -- manu at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |manu at gcc dot gnu dot org Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Last reconfirmed|0000-00-00 00:00:00 |2007-11-13 04:55:56 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33738