This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: optimization/10500: despite -Winline no warnings emited


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]