This is the mail archive of the gcc@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]

Re: template instantiation and anonymous namespaces


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


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