This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/21179] New: template in anonymous namespace in precompiled header
- From: "hans at jukesan dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 Apr 2005 15:26:32 -0000
- Subject: [Bug c++/21179] New: template in anonymous namespace in precompiled header
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
An anonymous namespace in an include file contains a template. I precompile the
include file. Now all C++ source files that include the precompiled header file
share the same anonymous namespace. In the attached example, two (identical)
source file include the precompiled header and then define an integer "i" within
an anonymous namespace. The linker should know that each of these integers are
invisible outside of its source file, but instead complains about a symbol that
is defined twice.
--
Summary: template in anonymous namespace in precompiled header
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: hans at jukesan dot de
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: g++ 4.0.0
GCC host triplet: Pentium 32-bit
GCC target triplet: Suse Linux 9.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21179