c++: Improve error-recovery for parms.
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:21 +0000 (18:04 -0400)
commitf7272c8a038847cf67e888828e58fc0e00d1f5d5
tree359bed4e4813a0cf61cab377d5fa2aac5c23265c
parentf898793b4545483adaf62c5efbc78cee518884e6
c++: Improve error-recovery for parms.

If a parameter is erroneous, we currently drop it, leading to "too many
arguments" errors later.  Treating the function as (...) avoids those
errors.

gcc/cp/ChangeLog:

* decl.c (grokparms): Return NULL_TREE if any parms were erroneous.

gcc/testsuite/ChangeLog:

* g++.dg/parse/error33.C: Adjust.
gcc/cp/decl.c
gcc/testsuite/g++.dg/parse/error33.C