[Bug c++/10929] New: g++-3.3 -Winline warns about functions that cannot/should not be inlined
thor@math.tu-berlin.de
gcc-bugzilla@gcc.gnu.org
Thu May 22 11:28:00 GMT 2003
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.
More information about the Gcc-bugs
mailing list