Re: [PATCH 1/5][GIMPLE FE] PR testsuite/80580. Handle missing labels in goto statements

2017-05-30 Thread Richard Biener
On Tue, May 30, 2017 at 1:46 PM, Richard Biener wrote: > On Mon, May 29, 2017 at 6:38 AM, Mikhail Maltsev wrote: >> Hi. Sorry for a long delay. >> >> On 02.05.2017 17:16, Richard Biener wrote: >>> Certainly an improvement. I suppose we can do better error recovery >>> for cases like >>> >>> if

Re: [PATCH 1/5][GIMPLE FE] PR testsuite/80580. Handle missing labels in goto statements

2017-05-30 Thread Richard Biener
On Mon, May 29, 2017 at 6:38 AM, Mikhail Maltsev wrote: > Hi. Sorry for a long delay. > > On 02.05.2017 17:16, Richard Biener wrote: >> Certainly an improvement. I suppose we can do better error recovery >> for cases like >> >> if (1) >>goto >> else >>goto bar; >> >> but I guess this is

Re: [PATCH 1/5][GIMPLE FE] PR testsuite/80580. Handle missing labels in goto statements

2017-05-28 Thread Mikhail Maltsev
Hi. Sorry for a long delay. On 02.05.2017 17:16, Richard Biener wrote: > Certainly an improvement. I suppose we can do better error recovery > for cases like > > if (1) >goto > else >goto bar; > > but I guess this is better than nothing. I think it's worth spending a bit more time to

Re: [PATCH 1/5][GIMPLE FE] PR testsuite/80580. Handle missing labels in goto statements

2017-05-02 Thread Richard Biener
On Mon, May 1, 2017 at 8:04 PM, Mikhail Maltsev wrote: > The first problem happens because we don't check for missing labels when > parsing > 'goto' statements. I.e.: > > __GIMPLE() void fn1() { > if (1) > goto > } > > The fix is pretty obvious: just add a check. > My question is: which fun

[PATCH 1/5][GIMPLE FE] PR testsuite/80580. Handle missing labels in goto statements

2017-05-01 Thread Mikhail Maltsev
The first problem happens because we don't check for missing labels when parsing 'goto' statements. I.e.: __GIMPLE() void fn1() { if (1) goto } The fix is pretty obvious: just add a check. My question is: which functions should I use to produce diagnostics? The surrounding code uses 'c_pars