This is the mail archive of the gcc-bugs@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]
Other format: [Raw text]

[Bug c++/18267] external linkage of functions declared in an anonymous namespace


------- 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


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