Re: syntax errors

2022-05-10 Thread Mohamed Atef via Gcc
Because the fixed code may output results that you don't want. int x 5; Should it be int x = 5; or int x5; The parsing operation is very hard and takes some time. There is a method called Global correction to implement a compiler that changes the code but besides the reason above it's too costly

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 vs what the use

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