Hi,
On 20/04/2018 19:46, Paolo Carlini wrote:
Hi,
in this error-recovery regression, after sensible diagnostic about
"two or more data types in declaration..." we get confused, we issue a
cryptic - but useful hint to somebody working on the present bug ;) -
"template definition of non-template" error and we finally crash. I
think the issue here is that we want to use
abort_fully_implicit_template as part of the error recovery done by
cp_parser_parameter_declaration_list, when the loop is exited early
after a cp_parser_parameter_declaration internally called
synthesize_implicit_template_parm. Indeed, if we do that we get the
same error recovery behavior we get for the same testcase modified to
not use an auto parameter (likewise for related testcases):
struct a {
void b() {}
void c(auto = [] {
if (a a(int int){})
;
}) {}
};
Tested x86_64-linux.
The last pending patch of mine...
https://gcc.gnu.org/ml/gcc-patches/2018-04/msg01014.html
Thanks!
Paolo.