This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/28016] GCC 4.2 emitting static template constants as global symbols?
- From: "bredelin at ucla dot edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Jun 2006 18:30:54 -0000
- Subject: [Bug c++/28016] GCC 4.2 emitting static template constants as global symbols?
- References: <bug-28016-2476@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from bredelin at ucla dot edu 2006-06-13 18:30 -------
Here is some source code that exhibits the problem:
---------------- begin a.C -----------------
template<class T1, class T2>
struct scalar_divides_assign {
static const bool computed ;
};
template<class T1, class T2>
const bool scalar_divides_assign<T1,T2>::computed = true;
----------------- end ------------------
To see the problem do
$ g++-4.2 -c a.C
$ nm a.o | grep computed
0000000000000000 D _ZN21scalar_divides_assignIT_T0_E8computedE
This symbol shouldn't be emitted, or at least not in this way.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28016