This is the mail archive of the gcc-patches@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]

Re: [C++ PATCH] Fix error recovery (PR c++/71450)


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


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