Re: [C++ PATCH] Fix up lambda decl specifier parsing ICE (PR c++/90842)

2019-11-20 Thread Jason Merrill
On 11/20/19 9:16 AM, Jakub Jelinek wrote: On Tue, Nov 19, 2019 at 11:35:02PM -0500, Jason Merrill wrote: It would seem better to break after consuming the token, so we just skip the extra processing and still give the same error. And instead of this, maybe set CP_PARSER_FLAGS_NO_TYPE_DEFINITION

Re: [C++ PATCH] Fix up lambda decl specifier parsing ICE (PR c++/90842)

2019-11-20 Thread Jakub Jelinek
On Tue, Nov 19, 2019 at 11:35:02PM -0500, Jason Merrill wrote: > It would seem better to break after consuming the token, so we just skip the > extra processing and still give the same error. > > And instead of this, maybe set CP_PARSER_FLAGS_NO_TYPE_DEFINITIONS so we > keep the same diagnostic fo

Re: [C++ PATCH] Fix up lambda decl specifier parsing ICE (PR c++/90842)

2019-11-19 Thread Jason Merrill
On 11/19/19 11:46 PM, Jakub Jelinek wrote: Hi! In lambdas, the only valid decl specifiers are mutable, constexpr or consteval. For various other simple specifiers it is fine to parse them and reject afterwards if the parsing is simple consuming of a single token and setting some flags, but as t

[C++ PATCH] Fix up lambda decl specifier parsing ICE (PR c++/90842)

2019-11-19 Thread Jakub Jelinek
Hi! In lambdas, the only valid decl specifiers are mutable, constexpr or consteval. For various other simple specifiers it is fine to parse them and reject afterwards if the parsing is simple consuming of a single token and setting some flags, but as the testcase shows, especially allowing type s