never-used inlines becoming statics

Todd Vierling tv@pobox.com
Fri Sep 4 12:22:00 GMT 1998


One code bloat problem in egcs 1.1 - which I'm considering a _bug_ because
bastring.cc is now unconditionally included by bastring.h - is the
generation of statics for inlines that are never used or referenced at all.

How to reproduce?  Compile the following program, then run "nm" on the
generated .o file.

=====
#include <stdexcept>
=====

No, there's no definitions there.  You can compile this even with -O3 and
end up with statics that never get used.

-frepo helps, but it can get complicated to use that, and adding all these
unused statics is just plain broken.

-- 
-- Todd Vierling (Personal tv@pobox.com; Bus. todd_vierling@xn.xerox.com)




More information about the Gcc-bugs mailing list