c++: Improve error recovery for =.
authorJason Merrill <jason@redhat.com>
Thu, 21 May 2020 14:27:11 +0000 (10:27 -0400)
committerJason Merrill <jason@redhat.com>
Thu, 21 May 2020 22:04:22 +0000 (18:04 -0400)
commit4f602147b6abbe05f862d3feda8290d4cf5c583f
treeeb820e6bff79f48df348fde354259b51082c9aed
parentf7272c8a038847cf67e888828e58fc0e00d1f5d5
c++: Improve error recovery for =.

In a template we were happily embedding error_mark_node in a MODOP_EXPR,
leading to confusion later.

gcc/cp/ChangeLog:

* typeck.c (build_x_modify_expr): Handle error_mark_node arguments.

gcc/testsuite/ChangeLog:

* g++.dg/cpp0x/lambda/lambda-ice30.C: Adjust.
* g++.dg/cpp0x/lambda/lambda-ice31.C: Adjust.
* g++.dg/ext/fixed1.C: Adjust.
* g++.dg/template/crash107.C: Adjust.
* g++.dg/template/error35.C: Adjust.
* g++.dg/template/sizeof-template-argument.C: Adjust.
gcc/cp/typeck.c
gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice30.C
gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice31.C
gcc/testsuite/g++.dg/ext/fixed1.C
gcc/testsuite/g++.dg/template/crash107.C
gcc/testsuite/g++.dg/template/error35.C
gcc/testsuite/g++.dg/template/sizeof-template-argument.C