From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13715 invoked by alias); 1 Mar 2006 23:01:44 -0000 Received: (qmail 13254 invoked by alias); 1 Mar 2006 23:01:41 -0000 Date: Wed, 01 Mar 2006 23:01:00 -0000 Message-ID: <20060301230141.13253.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug middle-end/4210] should not warning with dead code In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "joseph at codesourcery dot com" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2006-03/txt/msg00177.txt.bz2 List-Id: ------- Comment #13 from joseph at codesourcery dot com 2006-03-01 23:01 ------- Subject: Re: should not warning with dead code A workaround is to use ? : and statement expressions instead of "if". This way, the front-end setting of skip_evaluation disables these warnings. (skip_evaluation can't be set for if (0) because you can jump into if (0), whereas jumps into statement expressions are not permitted. Thus in general you need to parse the whole function body to tell if the if (0) is dead.) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4210