From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27054 invoked by alias); 16 Oct 2002 01:41:22 -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 27047 invoked from network); 16 Oct 2002 01:41:22 -0000 Received: from unknown (HELO nile.gnat.com) (205.232.38.5) by sources.redhat.com with SMTP; 16 Oct 2002 01:41:22 -0000 Received: by nile.gnat.com (Postfix, from userid 338) id 4C655F2941; Tue, 15 Oct 2002 21:41:21 -0400 (EDT) To: kevinlawton2001@yahoo.com, matz@suse.de, zack@codesourcery.com Subject: Re: Request of new __attribute__ for switch statements (elimination of the bounds check) Cc: egcs@tantalophile.demon.co.uk, gcc@gcc.gnu.org Message-Id: <20021016014121.4C655F2941@nile.gnat.com> Date: Tue, 15 Oct 2002 22:40:00 -0000 From: dewar@gnat.com (Robert Dewar) X-SW-Source: 2002-10/txt/msg00913.txt.bz2 > > It's just that I see removing the bounds checks on a switch statement > > as a marginal optimization compared to the risk. I've never seen a > > switch be the bottleneck in anything. I find this a remkarable attitude for a C compiler :-) Even Ada allows the programmer to remove all checks if that is what the programmer wants! After all in a safety critical program, such checks would not be permitted, because you simply cannot have a check that always succeeds, and whose failure branch is therefore deactivated code.