From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13998 invoked by alias); 31 Aug 2005 16:23:40 -0000 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 Received: (qmail 13868 invoked by uid 48); 31 Aug 2005 16:23:23 -0000 Date: Wed, 31 Aug 2005 16:24:00 -0000 From: "gdr at gcc dot gnu dot org" To: gcc-bugs@gcc.gnu.org Message-ID: <20050831162320.23658.gdr@gcc.gnu.org> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c/23658] New: bogus warning for missing return value X-Bugzilla-Reason: CC X-SW-Source: 2005-08/txt/msg03627.txt.bz2 List-Id: The testcase below was distilled from GMP source code (thanks to TG). Consider inline int foo (void){ if (1) return 0; } int bar () { return foo (); } compile with "-Wall -O2 -c". Gcc spits out tg.c: In function 'bar': tg.c:2: warning: control may reach end of non-void function 'foo' being inlined which clearly is bogus as the branch is *always* taken. -- Summary: bogus warning for missing return value Product: gcc Version: 4.0.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: gdr at gcc dot gnu dot org CC: gcc-bugs at gcc dot gnu dot org GCC host triplet: platform independent http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23658