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++/16564] g++ seems to go into an infinite loop after errors


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?

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