This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: template instantiation and anonymous namespaces
- From: Ian Lance Taylor <iant at google dot com>
- To: Stefan Lampe <stefanlampe at hotmail dot com>
- Cc: <gcc at gcc dot gnu dot org>
- Date: Tue, 14 Jul 2009 06:33:02 -0700
- Subject: Re: template instantiation and anonymous namespaces
- References: <BAY122-W202A329CB59A2FCB70D515B1230@phx.gbl>
Stefan Lampe <stefanlampe@hotmail.com> writes:
> Here's some code that produced a surprising result with GCC 4.3.3 on
> linux 64. I'd have expected all addresses output to be the same.
This message should have gone to gcc-help@gcc.gnu.org rather than
gcc@gcc.gnu.org. Please take any followups to gcc-help. Thanks.
Your test case doesn't compile, so it's hard to be sure what is going
on. The linker should normally merge template instantiations which have
the same name, but making the function static may be causing it to be
static in the file, and thus not merged.
Ian