From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14465 invoked by alias); 13 Jan 2010 17:38:47 -0000 Received: (qmail 14330 invoked by uid 48); 13 Jan 2010 17:38:26 -0000 Date: Wed, 13 Jan 2010 17:38:00 -0000 Message-ID: <20100113173826.14329.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug middle-end/42674] [4.4/4.5 Regression] Bogus "no return statement in function returning non-void" 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: 2010-01/txt/msg01534.txt.bz2 ------- Comment #5 from jakub at gcc dot gnu dot org 2010-01-13 17:38 ------- The difference between C and C++ FE is just r138140, i.e. the && !TREE_PUBLIC check. Just try extern void bar (void); static int foo (void) __attribute__ ((__noreturn__, __used__)); static int foo (void) { while (1) bar (); } which warns both in C and C++. I guess we should just add !TREE_THIS_VOLATILE (fndecl) check to both C and C++ FE. -- jakub at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|unassigned at gcc dot gnu |jakub at gcc dot gnu dot org |dot org | Status|NEW |ASSIGNED Last reconfirmed|2010-01-09 20:49:10 |2010-01-13 17:38:25 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42674