From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8990 invoked by alias); 22 May 2003 11:19:56 -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 8921 invoked by uid 48); 22 May 2003 11:19:55 -0000 Date: Thu, 22 May 2003 11:28:00 -0000 Message-ID: <20030522111955.8920.qmail@sources.redhat.com> From: "thor@math.tu-berlin.de" To: gcc-bugs@gcc.gnu.org Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/10929] New: g++-3.3 -Winline warns about functions that cannot/should not be inlined X-Bugzilla-Reason: CC X-SW-Source: 2003-05/txt/msg01946.txt.bz2 List-Id: PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10929 Summary: g++-3.3 -Winline warns about functions that cannot/should not be inlined Product: gcc Version: 3.3 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c++ AssignedTo: unassigned@gcc.gnu.org ReportedBy: thor@math.tu-berlin.de CC: gcc-bugs@gcc.gnu.org GCC build triplet: i386-pc-linux-gnu GCC host triplet: i386-pc-linux-gnu GCC target triplet: i386-pc-linux-gnu g++-3.3 -Winline generates warnings for functions it cannot inline that it shouldn't even try to inline because they are neither declared as "inline", nor defined in the class body. Save the following as "main.cpp" /* snip */ #include "foo.hpp" int main(int,char) { return foo(); } /* snip */ Save the following as "foo.hpp" /* snip */ int foo(void); /* snip */ Save the following as "foo.cpp" /* snip */ int foo(void) { return 0; } /* snip */ Then compile with $ g++-3.3 -O3 -Winline main.cpp new.cpp Result is a useless warning that int foo(void) could not be inlined. (Correct, but supposed not to be inline-able). ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.