Re: [PATCH] c++: Fix endless errors on invalid requirement seq [PR97742]

2021-02-11 Thread Jason Merrill via Gcc-patches
On 2/11/21 11:35 AM, Marek Polacek wrote: On Thu, Feb 11, 2021 at 05:30:24PM +0100, Jakub Jelinek via Gcc-patches wrote: Hi! As the testcase shows, if we reach CPP_EOF during parsing of requirement sequence, we end up with endless loop where we always report invalid requirement expression, don'

Re: [PATCH] c++: Fix endless errors on invalid requirement seq [PR97742]

2021-02-11 Thread Marek Polacek via Gcc-patches
On Thu, Feb 11, 2021 at 05:30:24PM +0100, Jakub Jelinek via Gcc-patches wrote: > Hi! > > As the testcase shows, if we reach CPP_EOF during parsing of requirement > sequence, we end up with endless loop where we always report invalid > requirement expression, don't consume any token (as we are at e

[PATCH] c++: Fix endless errors on invalid requirement seq [PR97742]

2021-02-11 Thread Jakub Jelinek via Gcc-patches
Hi! As the testcase shows, if we reach CPP_EOF during parsing of requirement sequence, we end up with endless loop where we always report invalid requirement expression, don't consume any token (as we are at eof) and repeat. This patch stops the loop when we reach CPP_EOF. Ok for trunk if it pas