public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/94571] Error: Expected comma or semicolon, comma found
Date: Thu, 16 Apr 2020 05:20:44 +0000	[thread overview]
Message-ID: <bug-94571-4-bD7uEC9oE0@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-94571-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94571

--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:

https://gcc.gnu.org/g:e4658c7dbbe88f742c96e5f58ee4a6d549d642ca

commit r10-7745-ge4658c7dbbe88f742c96e5f58ee4a6d549d642ca
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Thu Apr 16 07:19:57 2020 +0200

    c++: Fix pasto in structured binding diagnostics [PR94571]

    This snippet has been copied from the non-structured binding declaration
    parsing later in the function, and while for non-structured bindings
    it can be followed by comma or semicolon, structured bindings may be
    only followed by semicolon.

    Or, do we want to have a different message for the case when there is
    a comma (and keep this corrected one only if there is something else)
    that would explain better what is the bug (or add a fix-it hint)?
    Marek said in the PR that clang++ reports
    error: decomposition declaration must be the only declaration in its group

    There is another thing Marek noted (though, something for different spot),
    that diagnostic for auto x(1), [e,f] = test2; could also use a clearer
    wording like the above (or a fix-it hint), but the question is if we should
    assume [ after , as a structured binding or if we should do some tentative
    parsing first to figure out if it looks like a structured binding.

    2020-04-16  Jakub Jelinek  <jakub@redhat.com>

            PR c++/94571
            * parser.c (cp_parser_simple_declaration): Fix up a pasto in
            diagnostics.

            * g++.dg/cpp1z/decomp51.C: New test.

  parent reply	other threads:[~2020-04-16  5:20 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-12 23:37 [Bug c++/94571] New: " bisqwit at iki dot fi
2020-04-12 23:43 ` [Bug c++/94571] " bisqwit at iki dot fi
2020-04-13 17:14 ` mpolacek at gcc dot gnu.org
2020-04-14  8:30 ` jakub at gcc dot gnu.org
2020-04-14 14:27 ` mpolacek at gcc dot gnu.org
2020-04-14 19:10 ` jakub at gcc dot gnu.org
2020-04-16  5:20 ` cvs-commit at gcc dot gnu.org [this message]
2020-09-16 19:20 ` cvs-commit at gcc dot gnu.org
2020-09-17 17:33 ` jakub at gcc dot gnu.org

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=bug-94571-4-bD7uEC9oE0@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@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).