public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/16806] New: Internal compiler error: Error reporting routines re-entered.
@ 2004-07-28 19:12 jurka at ejurka dot com
  2004-07-28 20:18 ` [Bug c++/16806] [3.3 regression] " bangerth at dealii dot org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: jurka at ejurka dot com @ 2004-07-28 19:12 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2004-12-15 17:15 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-28 19:12 [Bug c++/16806] New: Internal compiler error: Error reporting routines re-entered jurka at ejurka dot com
2004-07-28 20:18 ` [Bug c++/16806] [3.3 regression] " bangerth at dealii dot org
2004-07-28 20:26 ` pinskia at gcc dot gnu dot org
2004-07-28 20:28 ` pinskia at gcc dot gnu dot org
2004-08-10 21:19 ` reichelt at gcc dot gnu dot org
2004-09-28 13:44 ` gdr at gcc dot gnu dot org
2004-12-15 12:09 ` reichelt at gcc dot gnu dot org
2004-12-15 16:11 ` reichelt at gcc dot gnu dot org
2004-12-15 17:09 ` cvs-commit at gcc dot gnu dot org
2004-12-15 17:15 ` reichelt at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).