Re: syntax errors

2022-05-10 Thread Mohamed Atef via Gcc
too costly to implement. Thanks Mohamed في الأربعاء، ١١ مايو، ٢٠٢٢ ١٢:٢٠ ص André Coelho via Gcc كتب: > Hey...if the compiler can check syntax errors...why can't it fixed them? > > > thanks > > > andre coelho > >

Re: syntax errors

2022-05-10 Thread Andrew Pinski via Gcc
On Tue, May 10, 2022 at 3:19 PM André Coelho via Gcc wrote: > > Hey...if the compiler can check syntax errors...why can't it fixed them? In some cases it does recommend ways of fixing it. But not all syntax errors are fixable. Also not all syntax errors might be the wrong behavior

syntax errors

2022-05-10 Thread André Coelho via Gcc
Hey...if the compiler can check syntax errors...why can't it fixed them? thanks andre coelho

Re: improve syntax errors

2019-01-03 Thread Martin Sebor
On 1/3/19 8:40 AM, David Malcolm wrote: On Thu, 2019-01-03 at 15:59 +0100, Daniel Marjamäki wrote: Hello! I have used GCC for decades and would like to contribute a little. :- ) Hi, and welcome! I would like to see if I can improve the syntax errors. Here is one example code: int x

Re: syntax errors

2019-01-03 Thread Jonathan Wakely
On Thu, 3 Jan 2019 at 17:03, Daniel Marjamäki wrote: > > Thank you for the quick reply. > > > how about "stray %qs token"? > > I will change. > > > I wonder how much we want to special-case this. Are you thinking about > > the case where there's a stray symbol in the code (perhaps due to a > > str

Re: syntax errors

2019-01-03 Thread Daniel Marjamäki
Thank you for the quick reply. > how about "stray %qs token"? I will change. > I wonder how much we want to special-case this. Are you thinking about > the case where there's a stray symbol in the code (perhaps due to a > stray keypress, or unfinished manual edits)? At the moment I only think a

Re: improve syntax errors

2019-01-03 Thread Jonathan Wakely
On Thu, 3 Jan 2019 at 15:40, David Malcolm wrote: > > On Thu, 2019-01-03 at 15:59 +0100, Daniel Marjamäki wrote: > > Hello! > > > > I have used GCC for decades and would like to contribute a little. :- > > ) > > Hi, and welcome! > > > I would l

Re: improve syntax errors

2019-01-03 Thread David Malcolm
On Thu, 2019-01-03 at 15:59 +0100, Daniel Marjamäki wrote: > Hello! > > I have used GCC for decades and would like to contribute a little. :- > ) Hi, and welcome! > I would like to see if I can improve the syntax errors. > > Here is one example code: > >

improve syntax errors

2019-01-03 Thread Daniel Marjamäki
Hello! I have used GCC for decades and would like to contribute a little. :-) I would like to see if I can improve the syntax errors. Here is one example code: int x = 3) + 0; I have created this ugly experimental patch: --- a/gcc/c/c-parser.c +++ b/gcc/c/c-parser.c @@ -2228,7 +2228,10