infinite recursion in parser, 1.1.1 prerelease
Andris Pavenis
pavenis@lanet.lv
Wed Nov 4 00:38: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.
>
I don't see this problem with DJGPP ports of
egcs-2.91.57 and 2.91.58. gcc only founds errors
in that code.
Andris
Reading specs from c:/djgpp/lib/gcc-lib/djgpp/egcs-291.58/specs
gcc version egcs-2.91.58 19981101 (egcs-1.1.1 pre-release)
c:/djgpp/lib/gcc-lib/djgpp/egcs-291.58/cpp.exe -lang-c++ -v -isystem c:/djgpp/bin/include -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -D__GNUC_MINOR__=91 -Dunix -Di386 -DGO32 -DMSDOS -DDJGPP=2 -D__unix__ -D__i386__ -D__GO32__ -D__MSDOS__ -D__DJGPP__=2 -D__unix -D__i386 -D__GO32 -D__MSDOS -D__DJGPP=2 -Asystem(unix) -Asystem(msdos) -Acpu(i386) -Amachine(i386) -D__EXCEPTIONS -D__OPTIMIZE__ t1.cc E:/cclmLcXK.ii
GNU CPP version egcs-2.91.58 19981101 (egcs-1.1.1 pre-release) (80386, BSD syntax)
#include "..." search starts here:
#include <...> search starts here:
c:/djgpp/contrib/grx23/include
c:/djgpp/lang/cxx
c:/djgpp/lib/gcc-lib/djgpp/egcs-291.58/include
c:/djgpp/include
End of search list.
c:/djgpp/lib/gcc-lib/djgpp/egcs-291.58/cc1plus.exe E:/cclmLcXK.ii -quiet -dumpbase t1.cc -O3 -version -o E:/cc0T9iOC.s
GNU C++ version egcs-2.91.58 19981101 (egcs-1.1.1 pre-release) (djgpp) compiled by GNU C version egcs-2.91.58 19981101 (egcs-1.1.1 pre-release).
t1.cc:4: explicit instantiation of non-template type `A'
t1.cc:11: explicit instantiation of non-template type `B'
-----
See the original message at http://www.egroups.com/list/egcs-bugs/?start=7815
--
Free e-mail group hosting at http://www.eGroups.com/
More information about the Gcc-bugs
mailing list