This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: optimization/10500: despite -Winline no warnings emited
- From: bangerth at dealii dot org
- To: fkaufman at ee dot ethz dot ch, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org, sensorflo at bigfoot dot com
- Date: 25 Apr 2003 18:34:05 -0000
- Subject: Re: optimization/10500: despite -Winline no warnings emited
- Reply-to: bangerth at dealii dot org, fkaufman at ee dot ethz dot ch, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org, sensorflo at bigfoot dot com, gcc-gnats at gcc dot gnu dot org
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