From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12486 invoked by alias); 27 Oct 2008 14:06:41 -0000 Received: (qmail 12230 invoked by uid 48); 27 Oct 2008 14:05:20 -0000 Date: Mon, 27 Oct 2008 14:06:00 -0000 Message-ID: <20081027140520.12229.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c++/36254] wrong "control reaches end of non-void function" warning In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "jakub 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: 2008-10/txt/msg01746.txt.bz2 ------- Comment #10 from jakub at gcc dot gnu dot org 2008-10-27 14:05 ------- Language specific tree codes are allowed until the gimplification is done, the cp_gimplify_expr langhook takes care of either rewriting the lang specific tree code into GENERIC (COND_EXPR in this case), or tuplifying it right away. BTW, looking at the other testcase, block_may_fallthru certainly isn't able to say whether a SWITCH_EXPR can fall thru or not, and it wouldn't be actually very easy. So perhaps we either need to run some pass that kills obvious dead code before reporting the "control reaches end" warnings, or really try harder during gimplification to figure out these cases and optimize it at that point. I'm not working on this ATM. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36254