This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/16564] g++ goes into an infinite loop after errors
- From: "bangerth at dealii dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 15 Jul 2004 12:49:10 -0000
- Subject: [Bug c++/16564] g++ goes into an infinite loop after errors
- References: <20040715110539.16564.steven@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From bangerth at dealii dot org 2004-07-15 12:49 -------
That's likely the smallest possible testcase:
-----------------
template <typename T> struct A {};
template <typename T> struct S {
S<A<T> > non_type;
typedef non_type type;
};
S<int> m;
-----------------
Of course the typedef can't succeed (since the named type is not
a type at all):
g/x> /home/bangerth/bin/gcc-3.5-pre/bin/c++ -c x.ii
x.ii:5: error: `non_type' does not name a type
However, after this error message we get into an endless loop.
This error exists in one form or other since at least 2.95. Some versions
on my harddisk show messages like
x.ii:5: instantiated from `S<A<A<A<A<A<A<A<A<A<A<A<int> > > > > > > > > > >
>'
over and over again, which may give an indication as to what is going wrong.
W.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16564