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]

Re: Bug in EGCS 1.1b (better than 1.0.3a though)


Christopher Curtis <ccurtis@ee.fit.edu> writes:

> #include <complex>
> template<class T> class MoreComplex : public complex<T> { private:
>   static int References = 0; };
> int main( void ) { MoreComplex<double> Object; }

> 1.0.3a gave linker errors (with additional code).

On what platform?  I can't reproduce the link error in 1.0.3.  With
1.1, I get the following correct error messages:

/home/msc/oliva/test.cc:6: ANSI C++ forbids in-class initialization of non-const static member `References'

-- 
Alexandre Oliva
mailto:oliva@dcc.unicamp.br mailto:aoliva@acm.org
http://www.dcc.unicamp.br/~oliva
Universidade Estadual de Campinas, SP, Brasil



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