public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/10929] New: g++-3.3 -Winline warns about functions that cannot/should not be inlined
@ 2003-05-22 11:28 thor@math.tu-berlin.de
  0 siblings, 0 replies; only message in thread
From: thor@math.tu-berlin.de @ 2003-05-22 11:28 UTC (permalink / raw)
  To: gcc-bugs

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.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-05-22 11:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-22 11:28 [Bug c++/10929] New: g++-3.3 -Winline warns about functions that cannot/should not be inlined thor@math.tu-berlin.de

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).