public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Martin Sebor <msebor@gmail.com>
To: Bernd Edlinger <bernd.edlinger@hotmail.de>,
	Jason Merrill <jason@redhat.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 00:09:00 -0000	[thread overview]
Message-ID: <161cb6f1-f2cd-32b9-119c-fa5c6263d893@gmail.com> (raw)
In-Reply-To: <DB7PR07MB535310D3F1B55012884DA03EE48F0@DB7PR07MB5353.eurprd07.prod.outlook.com>

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.)

Martin

> 
> New version of the patch is attached.
> 
> Bootstrapped and reg-tested on x86_64-pc-linux-gnu.
> Is it OK for trunk?
> 
> 
> Thanks
> Bernd.
> 

  reply	other threads:[~2019-01-07  0:09 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 [this message]
2019-01-07 15:38                     ` Bernd Edlinger
2019-01-07 16:58                       ` Jason Merrill

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=161cb6f1-f2cd-32b9-119c-fa5c6263d893@gmail.com \
    --to=msebor@gmail.com \
    --cc=bernd.edlinger@hotmail.de \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jason@redhat.com \
    --cc=law@redhat.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).