public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Mohamed Atef <mohamedatef1698@gmail.com>
To: "André Coelho" <andrealbergaria@gmail.com>
Cc: gcc@gcc.gnu.org
Subject: Re: syntax errors
Date: Wed, 11 May 2022 00:32:38 +0200	[thread overview]
Message-ID: <CAPFh8NLvzJph6rhrAyyowKUN+YzZcoxCfujQKbuJw5YuGP7x=Q@mail.gmail.com> (raw)
In-Reply-To: <a1103a19-392c-8157-53b5-9a311f7fe6de@gmail.com>

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 to implement.

Thanks
Mohamed

في الأربعاء، ١١ مايو، ٢٠٢٢ ١٢:٢٠ ص André Coelho via Gcc <gcc@gcc.gnu.org>
كتب:

> Hey...if the compiler can check syntax errors...why can't it fixed them?
>
>
> thanks
>
>
> andre coelho
>
>

  parent reply	other threads:[~2022-05-10 22:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-10 22:18 André Coelho
2022-05-10 22:23 ` Andrew Pinski
2022-05-10 22:32 ` Mohamed Atef [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-01-03 17:03 Daniel Marjamäki
2019-01-03 17:39 ` Jonathan Wakely

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAPFh8NLvzJph6rhrAyyowKUN+YzZcoxCfujQKbuJw5YuGP7x=Q@mail.gmail.com' \
    --to=mohamedatef1698@gmail.com \
    --cc=andrealbergaria@gmail.com \
    --cc=gcc@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).