From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3938 invoked by alias); 15 Oct 2002 20:00:19 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 3887 invoked from network); 15 Oct 2002 20:00:16 -0000 Received: from unknown (HELO bjl1.asuk.net) (81.29.64.88) by sources.redhat.com with SMTP; 15 Oct 2002 20:00:16 -0000 Received: from bjl1.asuk.net (localhost [127.0.0.1]) by bjl1.asuk.net (8.12.5/8.12.5) with ESMTP id g9FK2mVn031821; Tue, 15 Oct 2002 21:02:48 +0100 Received: (from jamie@localhost) by bjl1.asuk.net (8.12.5/8.12.5/Submit) id g9FK2lPC031819; Tue, 15 Oct 2002 21:02:47 +0100 X-Authentication-Warning: bjl1.asuk.net: jamie set sender to egcs@tantalophile.demon.co.uk using -f Date: Tue, 15 Oct 2002 13:29:00 -0000 From: Jamie Lokier To: Michael Matz Cc: Kevin Lawton , gcc@gcc.gnu.org Subject: Re: Request of new __attribute__ for switch statements (elimination of the bounds check) Message-ID: <20021015200247.GA31811@bjl1.asuk.net> References: <20021015014101.GB27718@bjl1.asuk.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4i X-SW-Source: 2002-10/txt/msg00860.txt.bz2 Michael Matz wrote: > On Tue, 15 Oct 2002, Jamie Lokier wrote: > > [... strict enum proposal ...] > > > > (It would be appropriate to add a warning when an enum with this > > attribute is converted to an integer). > > That's not the problematic direction. I can't see why converting such an > enum to an integer would be dangerous. But converting _to_ such an enum > should get a warning. Good point. (I was thinking of enum arithmetic like `CAT | DOG' being disallowed for strict enums -- I believe that is defined for standard enums). -- Jamie