This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: C++ PATCH to constant_value_1 for c++/9335 (excessive error cascade with infinite template recursion)
- From: Manuel López-Ibáñez <lopezibanez at gmail dot com>
- To: Jason Merrill <jason at redhat dot com>
- Cc: gcc-patches List <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 21 Apr 2010 09:49:20 +0200
- Subject: Re: C++ PATCH to constant_value_1 for c++/9335 (excessive error cascade with infinite template recursion)
- References: <4BCE55AB.3010103@redhat.com>
On 21 April 2010 03:32, Jason Merrill <jason@redhat.com> wrote:
> In PR 9335 we gave an extremely long string of error messages in response to
> hitting the template recursion limit: we are unable to evaluate the
> initializer for one instantiation, so we think it's non-constant, so the
> initializer for the next instantiation is also non-constant, and so on.
> ?This patch fixes the error cascade by treating error_mark_node as a
> constant if the decl is marked as having been initialized with a constant.
>
> I also adjusted prune.exp to prune the recently added "skipping N
> instantiation contexts" line.
If you do that, then we cannot test that it is emitted, can we?
Cheers,
Manuel.