Improve syntax error

2019-01-04 Thread Daniel Marjamäki
Hello! I just chose the word "unmatched" for now.. let me know if "stray" or some other word is better. :-) I have a work in progress patch that as far as I can tell works. I wonder if you see some problems with my design. What do I need to do..? Basically I have chosen to add a nesting_depth to

Re: Improve syntax error

2019-01-05 Thread Segher Boessenkool
Hi Daniel, Some mostly boring comments: On Fri, Jan 04, 2019 at 09:25:10PM +0100, Daniel Marjamäki wrote: > The first reason is the hard problem, but maybe we can ignore this now also: > > void f() > { > } // <- looking at the indentation, it seems preferable to warn about > this > } I th

Re: Improve syntax error

2019-01-05 Thread Daniel Marjamäki
Thanks! I will take care of the indentation and fix the comment. > I think the indentation warnings should catch that? I get this: void f() { } } // <- error: expected identifier or '(' before '}' token I ran with -Wall -Wextra -pedantic and did not see a indentation warning. Am I missing so

Re: Improve syntax error

2019-01-05 Thread Daniel Marjamäki
Here is a new patch with fixed comments and indentation diff --git a/gcc/c/c-parser.c b/gcc/c/c-parser.c index 972b629c092..294ff34fe55 100644 --- a/gcc/c/c-parser.c +++ b/gcc/c/c-parser.c @@ -171,6 +171,8 @@ struct GTY(()) c_parser { /* How many look-ahead tokens are available (0 - 4, or

Re: Improve syntax error

2019-01-08 Thread Daniel Marjamäki
Ping Den lör 5 jan. 2019 kl 20:44 skrev Daniel Marjamäki : > > Here is a new patch with fixed comments and indentation > > diff --git a/gcc/c/c-parser.c b/gcc/c/c-parser.c > index 972b629c092..294ff34fe55 100644 > --- a/gcc/c/c-parser.c > +++ b/gcc/c/c-parser.c > @@ -171,6 +171,8 @@ struct GTY

Re: Improve syntax error

2019-01-08 Thread Joseph Myers
On Tue, 8 Jan 2019, Daniel Marjamäki wrote: > Ping New features should be submitted in development stage 1; we're in regression-fixes-only mode at present so new features will not receive attention until probably April or May. When submitting a revised patch, please make sure each patch submis

Re: Improve syntax error

2019-01-10 Thread Segher Boessenkool
On Sat, Jan 05, 2019 at 06:02:08PM +0100, Daniel Marjamäki wrote: > > I think the indentation warnings should catch that? > > I get this: > > void f() > { > } > } // <- error: expected identifier or '(' before '}' token > > I ran with -Wall -Wextra -pedantic and did not see a indentation > war