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

[Bug c++/28016] GCC 4.2 emitting static template constants as global symbols?



------- 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


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