From: "Daniel Marjamäki" <daniel.marjamaki@gmail.com>
To: David Malcolm <dmalcolm@redhat.com>, gcc@gcc.gnu.org
Subject: Re: syntax errors
Date: Thu, 03 Jan 2019 17:03:00 -0000 [thread overview]
Message-ID: <CAMabPZQ+cm2XKYYvH8C7LPabhaV1D6C9gNDaEUJWkJQ3-NNWFw@mail.gmail.com> (raw)
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 about ) } ]
I would like to focus on only those 3 to start with. but it sounds
good to prepare for more stray tokens later.
> if (c_parser_next_token_is_meaningless_p (parser))
> complain_about_stray_token (parser);
> else
> ...
sure!
> It might make sense to emit a fix-it hint suggesting the removal of the
> stray token.
It is 50% chance that the closing paranthesis should be removed. Maybe
there is a missing "(".
Maybe the error message should indicate that.. something like "either
there is missing "(" or this ")" is a stray token".
Best regards,
Daniel Marjamäki
next reply other threads:[~2019-01-03 17:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-03 17:03 Daniel Marjamäki [this message]
2019-01-03 17:39 ` Jonathan Wakely
2022-05-10 22:18 André Coelho
2022-05-10 22:23 ` Andrew Pinski
2022-05-10 22:32 ` Mohamed Atef
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=CAMabPZQ+cm2XKYYvH8C7LPabhaV1D6C9gNDaEUJWkJQ3-NNWFw@mail.gmail.com \
--to=daniel.marjamaki@gmail.com \
--cc=dmalcolm@redhat.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).