Internal compiler error.
Peter Mattis
petm@scam.XCF.Berkeley.EDU
Wed Apr 21 15:15:00 GMT 1999
I encountered an internal compiler error while trying to templatize
some code. I narrowed the test case for the bug down to the following
code:
template <class T>
class A
{
typedef enum
{
foo
} B;
A (B b);
};
template <class T>
A<T>::A (B b)
{
}
Compiling (with "g++ -o test.o -c test.cc") gives the following error:
test.cc:14: Internal compiler error.
test.cc:14: Please submit a full bug report to `bug-g++@prep.ai.mit.edu'.
This is under linux 2.0.28 using glibc 2.0.4, egcs-2.90.00 970814. The
relevant points seem to be the typedef enum, the template and that
the enum is defined within the class.
I've changed my code to using "enum B" which is a work around, but I
thought I'd report this and also query as to whether this bug should
be sent to the "bug-g++" list as well or whether that error message
should be changed to tell people to report bugs to "egcs-bug".
Peter
More information about the Gcc-bugs
mailing list