re PR c++/44609 (Invalid template code causes infinite loop of error messages)
authorJason Merrill <jason@redhat.com>
Mon, 11 Jul 2011 18:52:12 +0000 (14:52 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Mon, 11 Jul 2011 18:52:12 +0000 (14:52 -0400)
commit4904b64bf7dc5538b06d2ba01fc1c55231c09bb8
tree3256896a64479248e6b7bfbaeb3af03b35d3636e
parent848ca96f30746fc6972105de156656ce8c5ee586
re PR c++/44609 (Invalid template code causes infinite loop of error messages)

PR c++/44609
* cp-tree.h (struct tinst_level): Add errors field.
* pt.c (neglectable_inst_p, limit_bad_template_recurson): New.
(push_tinst_level): Don't start another decl in that case.
(reopen_tinst_level): Adjust errors field.
* decl2.c (cp_write_global_declarations): Don't complain about
undefined inline if its template was defined.
* mangle.c (mangle_decl_string): Handle failure from push_tinst_level.

From-SVN: r176176
gcc/cp/ChangeLog
gcc/cp/cp-tree.h
gcc/cp/decl2.c
gcc/cp/mangle.c
gcc/cp/pt.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/template/recurse3.C [new file with mode: 0644]