public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jason Merrill <jason@redhat.com>
To: Bernd Edlinger <bernd.edlinger@hotmail.de>,
	Martin Sebor <msebor@gmail.com>, Martin Sebor <msebor@redhat.com>,
	"gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>,
	Jeff Law <law@redhat.com>, Nathan Sidwell <nathan@acm.org>
Subject: Re: [PATCH, C++,rebased] Fix PR c++/88261
Date: Mon, 07 Jan 2019 16:58:00 -0000	[thread overview]
Message-ID: <1abcd95e-25e4-86a7-7e92-c676352e4265@redhat.com> (raw)
In-Reply-To: <AM6PR07MB5608B1AA8344DD11ADF1BE5DE4890@AM6PR07MB5608.eurprd07.prod.outlook.com>

On 1/7/19 10:38 AM, Bernd Edlinger wrote:
> On 1/7/19 1:08 AM, Martin Sebor wrote:
>> On 1/5/19 9:04 AM, Bernd Edlinger wrote:
>>> On 1/4/19 10:22 PM, Jason Merrill wrote:
>>>> Hmm, I'm uncomfortable with starting to pass in the decl just for the sake of deciding whether this diagnostic should be a pedwarn or error. In general, because of copy elision, we can't know at this point what we're initializing, so I'd rather not pretend we can.  Instead, maybe add a LOOKUP_ALLOW_FLEXARY_INIT flag that you can add to the flags argument in the call from store_init_value?
>>>>
>>>
>>> Okay, I reworked the patch, to pass a bit in the flags, it was a bit more complicated
>>> than anticipated, because it is necessary to pass the flag thru process_init_constructor
>>> and friends to the recursive invocation of digest_init_r.  It turned out that
>>> digest_nsdmi_init did not need to change, since it is always wrong to use flexarray init
>>> there.  I added a new test case (flexary32.C) to exercises a few cases where non static
>>> direct member intializers are allowed to use flexarrays (in static members) and where that
>>> would be wrong (in automatic members).  So  that seems to work.
>>
>> If that resolves pr69338 can you please also reference the bug in
>> the test and in the ChangeLog?  (Ditto for pr69697.)
>>
> 
> Yes, those appear to be fixed as well.
> Added pr69338 + pr69697 to the ChangeLog,
> and also added test cases from both PRs.
> 
> 
> Attached the otherwise unchanged v3 of my patch.
> 
> Is to OK for trunk?

OK, thanks.

Jason

      reply	other threads:[~2019-01-07 16:58 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-15  8:36 [PATCH, C++] " Bernd Edlinger
2018-12-15  9:33 ` Jakub Jelinek
2018-12-15 10:36   ` Bernd Edlinger
2018-12-19  3:35 ` Jason Merrill
2018-12-20 17:50   ` Martin Sebor
2018-12-20 18:11     ` Martin Sebor
2018-12-20 21:08       ` Bernd Edlinger
2018-12-21  1:04         ` Martin Sebor
2018-12-22 19:38           ` Bernd Edlinger
2019-01-04 15:31             ` [PATCH, C++,rebased] " Bernd Edlinger
2019-01-04 21:23               ` Jason Merrill
2019-01-04 22:23                 ` Bernd Edlinger
2019-01-05 16:05                 ` Bernd Edlinger
2019-01-07  0:09                   ` Martin Sebor
2019-01-07 15:38                     ` Bernd Edlinger
2019-01-07 16:58                       ` 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=1abcd95e-25e4-86a7-7e92-c676352e4265@redhat.com \
    --to=jason@redhat.com \
    --cc=bernd.edlinger@hotmail.de \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=law@redhat.com \
    --cc=msebor@gmail.com \
    --cc=msebor@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).