------- Additional Comments From giovannibajo at libero dot it 2004-11-02 01:22 ------- It is not exactly a G++ choice. This is what the ISO/ANSI C++ International Standard mandates. I suggest you to post a mail to the newsgroup comp.lang.c++.moderated or to comp.std.c++ to enquire an explanation for the rationale.
Also, notice you can try compiling your code with -ffunction-sections to let the linker drop the unused functions from the final executable. But remember that this option might regress the code performance a bit on x86 because it forces the compiler to generate slower code for each function call. Alternatively, why don't you simply use "static"? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18267