public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: optimization/10500: despite -Winline no warnings emited
@ 2003-04-25 18:34 bangerth
0 siblings, 0 replies; 2+ messages in thread
From: bangerth @ 2003-04-25 18:34 UTC (permalink / raw)
To: fkaufman, gcc-bugs, gcc-prs, nobody, sensorflo
Synopsis: despite -Winline no warnings emited
State-Changed-From-To: open->analyzed
State-Changed-By: bangerth
State-Changed-When: Fri Apr 25 18:34:04 2003
State-Changed-Why:
Confirmed. Here's a self-contained testcase:
-----------------------
struct CFoo
{
int foo(int i);
inline int foo_inline1(int sw, int i);
};
inline int CFoo::foo_inline1( int sw, int i )
{
switch (sw)
{
case 0: return i;
case 10: return i*2;
case 20: return i+3;
case 30: return i^4;
case 40: return i%4;
case 50: return i*i;
case 60: return i-i*2;
case 70: return i*8;
case 80: return i/44;
case 90: return i*100;
}
return 0;
}
int CFoo::foo( int i )
{ return foo_inline1(40, i);
}
---------------------------------
The assembler output still contains the call to
foo_inline1, up to present 3.4. It's arguable if the
fact that it is not inlined is a bug, but it should at
least warn if -Winline is given -- the latter doesn't
happen.
W.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10500
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: optimization/10500: despite -Winline no warnings emited
@ 2003-04-29 7:57 steven
0 siblings, 0 replies; 2+ messages in thread
From: steven @ 2003-04-29 7:57 UTC (permalink / raw)
To: fkaufman, gcc-bugs, gcc-prs, nobody, sensorflo
Synopsis: despite -Winline no warnings emited
State-Changed-From-To: analyzed->closed
State-Changed-By: steven
State-Changed-When: Tue Apr 29 07:57:31 2003
State-Changed-Why:
Fixed (with the patch PR 10180)
t.cc: In member function `int CFoo::foo(int)':
t.cc:8: warning: inlining failed in call to `int CFoo::foo_inline1(int, int)'
t.cc:26: warning: called from here
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10500
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-04-29 7:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-25 18:34 optimization/10500: despite -Winline no warnings emited bangerth
2003-04-29 7:57 steven
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).