infinite recursion in parser, 1.1.1 prerelease

Ewgenij Gawrilow gawrilow@math.TU-Berlin.DE
Tue Nov 3 01:54:00 GMT 1998


This small program brings the parser in an endless recursion loop:

template <class T>
struct A {
   typedef int TYPE;
};

template <class T>
struct B : public A<T> {
   struct C {
      TYPE i;
   };
};

The parser crashes at the second occurence of `TYPE', in the nested structure
C. This phenomenon has been already observed with the egcs release 1.1, but I
haven't managed to reduce the test suite to a reasonable size that time. Now
it's small enough, isn't it?

The prerelease was tested under Solaris 2.6 on the SPARC platform:

SunOS goldfinger 5.6 Generic_105181-04 sun4u sparc SUNW,Ultra-1

and configured with following options:

--host=sparc-sun-solaris2.6 --prefix=/usr/local/egcs --enable-shared
--enable-version-specific-runtime-libs

I hope, this bug is severe enough to be fixed already in the upcoming 1.1.1
release.


With best regards,

Ewgenij Gawrilow
Dept. of Mathematics,
Technical University of Berlin



More information about the Gcc-bugs mailing list