This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/16806] New: Internal compiler error: Error reporting routines re-entered.
- From: "jurka at ejurka dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Jul 2004 19:12:21 -0000
- Subject: [Bug c++/16806] New: Internal compiler error: Error reporting routines re-entered.
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
I don't know what I'm doing with c++ and was trying to get something to compile
when I got an internal compiler error. Clearly my code is wrong, but still
shouldn't have an internal error.
I was trying to compile the following:
#include <iostream>
template<class T> class myclass {
public:
template< T > int Get< typename U >();
template<T> int Get<float>() { return 1;}
template<T> int Get<int>() { return 2;}
};
int main() {
myclass<int> c;
std::cerr << c.Get<float> << std::endl;
return 0;
}
g++ -Wall specnothing.cpp
specnothing.cpp:6: error: parse error before `>' token
specnothing.cpp:8: error: template-id `Get<float>' in declaration of primary
template
specnothing.cpp:9: error: template-id `Get<int>' in declaration of primary
template
specnothing.cpp: In instantiation of `myclass<int>':
specnothing.cpp:13: instantiated from here
specnothing.cpp:9: error: `template<int <anonymous> > int myclass::Get() [with
T <anonymous> = enumerator, T = int]' and `template<int <anonymous> > int
myclass::Get() [with T <anonymous> = enumerator, T = int]' cannot be
overloaded
specnothing.cpp: In function `int main()':
specnothing.cpp:14: error: no match for 'operator<<' in 'std::cerr <<
Internal compiler error: Error reporting routines re-entered.
Please submit a full bug report,
with preprocessed source if appropriate.
For Debian GNU/Linux specific bug reporting instructions, see
<URL:http://gcc.gnu.org/bugs.html>.
g++ -v
Reading specs from /usr/lib/gcc-lib/i486-linux/3.3.4/specs
Configured with: ../src/configure -v
--enable-languages=c,c++,java,f77,pascal,objc,ada,treelang --prefix=/usr
--mandir=/usr/share/man --infodir=/usr/share/info
--with-gxx-include-dir=/usr/include/c++/3.3 --enable-shared --with-system-zlib
--enable-nls --without-included-gettext --enable-__cxa_atexit
--enable-clocale=gnu --enable-debug --enable-java-gc=boehm
--enable-java-awt=xlib --enable-objc-gc i486-linux
Thread model: posix
gcc version 3.3.4 (Debian 1:3.3.4-4)
uname -a
Linux doug 2.4.22 #2 SMP Sat Sep 27 20:15:00 PDT 2003 i686 GNU/Linux
--
Summary: Internal compiler error: Error reporting routines re-
entered.
Product: gcc
Version: 3.3.4
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jurka at ejurka dot com
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16806