This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/28370] [4.2 Regression] undefined reference to template class static variable in an anonymous namespace
- From: "jakub at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Jul 2006 16:25:05 -0000
- Subject: [Bug c++/28370] [4.2 Regression] undefined reference to template class static variable in an anonymous namespace
- References: <bug-28370-8961@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #9 from jakub at gcc dot gnu dot org 2006-07-13 16:25 -------
The reason why the var is not emitted seems to be that
note_vague_linkage_var is not called on it in finish_static_data_member_decl.
If I replace
if (! processing_template_decl && TREE_PUBLIC (decl))
note_vague_linkage_var (decl);
back with:
if (! processing_template_decl)
note_vague_linkage_var (decl);
it works just fine.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28370