This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C++ PATCH] Fix error recovery (PR c++/71450)
- From: Jason Merrill <jason at redhat dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: gcc-patches List <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 23 Nov 2016 10:45:29 -0500
- Subject: Re: [C++ PATCH] Fix error recovery (PR c++/71450)
- Authentication-results: sourceware.org; auth=none
- References: <20161123145655.GO3541@tucnak.redhat.com>
On Wed, Nov 23, 2016 at 9:56 AM, Jakub Jelinek <jakub@redhat.com> wrote:
> Is there a reason why we don't return error_mark_node no matter what
> complain contains?
In some cases, outside of SFINAE context we can give an error and then
continue to do something reasonable.
> At least on the testcase if we don't return error_mark_node for
> the uses of var before deduction of auto, then we ICE later on in some
> assertion that expects sane types on the variables. On the other testcase
> it avoids a cascading of further errors, emits just the single error.
Then it seems that in this case we should always return error_mark_node.
> Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
OK.
> What about all the other spots in pt.c that return error_mark_node
> if mark_used failed only if complain doesn't have tf_error set?
They should probably be changed as well.
Jason