This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/49118] Endless operator-> chain causes infinite loop
- From: "potswa at mac dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 26 May 2011 03:37:46 +0000
- Subject: [Bug c++/49118] Endless operator-> chain causes infinite loop
- Auto-submitted: auto-generated
- References: <bug-49118-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49118
--- Comment #4 from David Krauss <potswa at mac dot com> 2011-05-26 03:37:44 UTC ---
Created attachment 24359
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24359
Patch fixes behavior but error message repeats twice.
I implemented the suggested fix, but the resulting error message repeats the
part about "template instantiation depth exceeds maximum" twice. The template
backtrace appears after the error, not before as with a usual nesting problem.
Is there something I'm obviously doing wrong here?
Here are the most relevant lines from the attached patch.
/* For diagnostic purposes, pretend that the chain is nested. */
if (CLASS_TYPE_P (chain_type) && CLASSTYPE_TEMPLATE_INFO (chain_type))
push_tinst_level (chain_type);