When compiling with -Winline -O[2,3,s], I frequently get errors like:

mistream.h:196: warning: called from here
mistream.h:174: warning: inlining failed in call to 'bool
ustl::istream::aligned(size_t) const': --param large-function-growth limit 
reached

This is understandable, since I use a lot of inlining and inevitably run over
this limit or one of the others. Explicitly increasing the --param value solves
the problem.

However, it bothers me that the compiler requires special flags to inline
functions that I have already explicitly declared as inline. When I use the
inline keyword in a declaration, I expect the compiler to inline it no matter
what, with debug builds being the only exception.

So can the optimizer automatically adjust inlining parameters and inline
everything I tell it to inline? I suppose it might be a bit of work, since
explicit parameter limits should still be honored.

-- 
           Summary: Explicit inlining should never fail
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: minor
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: msharov at hotmail dot com
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21587

Reply via email to