public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jason Merrill <jason@redhat.com>
To: Jakub Jelinek <jakub@redhat.com>
Cc: Nathan Sidwell <nathan@acm.org>,
	gcc-patches List <gcc-patches@gcc.gnu.org>
Subject: Re: [C++ PATCH] Fix structured binding initializer checking (PR c++/81888)
Date: Mon, 27 Nov 2017 21:54:00 -0000	[thread overview]
Message-ID: <CADzB+2kL293NOzw-i8f0QE0WquekwH10+wAVOM1v6LSe2WUbwg@mail.gmail.com> (raw)
In-Reply-To: <20171123203556.GT14653@tucnak>

On Thu, Nov 23, 2017 at 3:35 PM, Jakub Jelinek <jakub@redhat.com> wrote:
> Hi!
>
> My PR81258 fix actually rejects even valid cases.
> The standard says that:
> "The initializer shall be of the form “= assignment-expression”, of the form
> “{ assignment-expression }”, or of the form “( assignment-expression )”
> Now, if the form is = assigment-expression, we can e.g. in templates end up
> with CONSTRUCTOR initializer which has more or fewer elements than 1.
>
> So, this patch restricts the checks to only BRACE_ENCLOSED_INITIALIZER_P
> and only if is_direct_init (i.e. not the = assignment-expression form).
>
> Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk
> (and 7.x after a while)?

Yes.

Jason

      reply	other threads:[~2017-11-27 21:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-23 20:58 Jakub Jelinek
2017-11-27 21:54 ` Jason Merrill [this message]

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=CADzB+2kL293NOzw-i8f0QE0WquekwH10+wAVOM1v6LSe2WUbwg@mail.gmail.com \
    --to=jason@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=nathan@acm.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).