-Os & inlining functions used only once
Joe Buck
jbuck@racerx.synopsys.com
Tue Apr 17 11:50:00 GMT 2001
> 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).
More information about the Gcc
mailing list