This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/16564] g++ seems to go into an infinite loop after errors
- From: "manu at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 27 Dec 2013 20:53:17 +0000
- Subject: [Bug c++/16564] g++ seems to go into an infinite loop after errors
- Auto-submitted: auto-generated
- References: <bug-16564-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16564
--- Comment #20 from Manuel LÃpez-IbÃÃez <manu at gcc dot gnu.org> ---
(In reply to Manuel LÃpez-IbÃÃez from comment #19)
> (In reply to Volker Reichelt from comment #18)
> > The first error message about exceeding the maximum template instantiation
> > depth appears rather quickly. So maybe we could make the first error message
> > a fatal one to avoid further processing of potentially bogus nested classes.
>
> It seems to me GCC is doing something strange. See comment #14. But what you
> suggest seems to be what Clang++ is doing:
Although GCC is still much slower than Clang for Steven's original testcase, so
the above wouldn't be a complete fix.
And the long lines are very ugly. Perhaps there is a way to summarize such a
recursive template instantiation.
Still, making the "error: template instantiation depth exceeds maximum" a fatal
error seems a good idea to me.
Jason?