This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/18267] external linkage of functions declared in an anonymous namespace
- From: "giovannibajo at libero dot it" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 2 Nov 2004 01:22:40 -0000
- Subject: [Bug c++/18267] external linkage of functions declared in an anonymous namespace
- References: <20041101183010.18267.TazForEver@dlfp.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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