[pushed] c++: Improve error recovery for =.

2020-05-21 Thread Jason Merrill via Gcc-patches
In a template we were happily embedding error_mark_node in a MODOP_EXPR, leading to confusion later. Tested x86_64-pc-linux-gnu, applying to trunk. gcc/cp/ChangeLog 2020-05-21 Jason Merrill * typeck.c (build_x_modify_expr): Handle error_mark_node arguments. --- gcc/cp/typeck.c

[pushed] c++: Improve error-recovery for parms.

2020-05-21 Thread Jason Merrill via Gcc-patches
If a parameter is erroneous, we currently drop it, leading to "too many arguments" errors later. Treating the function as (...) avoids those errors. Tested x86_64-pc-linux-gnu, applying to trunk. gcc/cp/ChangeLog 2020-05-21 Jason Merrill * decl.c (grokparms): Return NULL_TREE if any