This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/49118] Endless operator-> chain causes infinite loop


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);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]