This is the mail archive of the gcc@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]

Re: -Os & inlining functions used only once



> Perhaps it could make sense to add a warning (not enabled through either -W
> or -Wall) which would warn if a static function used only once was not
> marked inline.

Or the user can compile twice, and the first compile writes a side file
that is read the second time.  That approach can be extended to allow
for optimizations across compilation units (the canonical C++ example
is to notice which virtual functions are never overriden by derived
classes, permitting direct calls or inlined calls rather than calls
through the vtable).


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