This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
more about template bugs in 2.95.2 and an ICE in 20000228
- To: gcc-bugs at gcc dot gnu dot org
- Subject: more about template bugs in 2.95.2 and an ICE in 20000228
- From: dvv at dvv dot ru (Dima Volodin)
- Date: Wed, 01 Mar 2000 18:18:27 GMT
- Organization: Huh?
# cat 00.cc
template <typename T>
class C {
public:
#ifdef ENUM
enum {N = 10};
#else
static unsigned const N (10);
#endif
static double x [N];
};
template <typename T>
double C <T>::x [C <T>::N] = {1, 2, 3};
# g++ -S -B /usr/local/lib/gcc-lib/i586--solaris2.7/2.95.2/ 00.cc
00.cc:13: conflicting types for `double C<T>::x[C<T>::N]'
00.cc:9: previous declaration as `double C<T>::x[C<T>::N]'
# g++ -S -B /usr/local/lib/gcc-lib/i586--solaris2.7/2.95.2/ -DENUM 00.cc
######## this one passed !!!
# g++ -S -B /archive/egcs-20000228/gcc/ 00.cc
00.cc:7: Internal compiler error.
00.cc:7: Please submit a full bug report.
00.cc:7: See <URL:http://www.gnu.org/software/gcc/bugs.html> for
00.cc:7: instructions.
# g++ -S -B /archive/egcs-20000228/gcc/ -DENUM 00.cc
00.cc:13: conflicting types for `double C<T>::x[C<T>::N]'
00.cc:9: previous declaration as `double C<T>::x[10]'
Cheers!
Dima