This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/44609] Invalid template code causes infinite loop of error messages
- From: "jason at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 10 Jul 2011 07:46:04 +0000
- Subject: [Bug c++/44609] Invalid template code causes infinite loop of error messages
- Auto-submitted: auto-generated
- References: <bug-44609-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44609
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jason at gcc dot gnu.org
--- Comment #7 from Jason Merrill <jason at gcc dot gnu.org> 2011-07-10 05:32:10 UTC ---
This isn't actually an infinite loop; it's a sequence of recursive
instantiations which hit an error in each instantiation of the same function.
Eventually it will hit the maximum template instantiation depth and stop, but
that takes a very long time with the default -ftemplate-depth.
It probably makes sense not to continue to instantiate a template after one
instantiation has produced an error.