Re: [PATCH] have chkp skip flexible member arrays (PR #79986)

2017-04-07 Thread Jason Merrill
On Wed, Mar 29, 2017 at 7:07 PM, Martin Sebor wrote: > On 03/21/2017 01:33 PM, Jason Merrill wrote: >> On Tue, Mar 21, 2017 at 11:08 AM, Martin Sebor wrote: >>> On 03/20/2017 10:27 PM, Jason Merrill wrote: On Mon, Mar 20, 2017 at 7:58 PM, Martin Sebor wrote: > On 03/20/2017 05:51 PM, Ja

Re: [PATCH] have chkp skip flexible member arrays (PR #79986)

2017-03-29 Thread Martin Sebor
On 03/21/2017 01:33 PM, Jason Merrill wrote: On Tue, Mar 21, 2017 at 11:08 AM, Martin Sebor wrote: On 03/20/2017 10:27 PM, Jason Merrill wrote: On Mon, Mar 20, 2017 at 7:58 PM, Martin Sebor wrote: On 03/20/2017 05:51 PM, Jason Merrill wrote: On Mon, Mar 20, 2017 at 7:04 PM, Martin Sebor

Re: [PATCH] have chkp skip flexible member arrays (PR #79986)

2017-03-21 Thread Martin Sebor
Since I've also spent some time on this: my take on this is that the C++ FE should just follow C FE's suit and reject such initializations where possible; it seems they've never worked reliably anyway, and bring more harm than good. I don't see that rejecting such code would cause too much troubl

Re: [PATCH] have chkp skip flexible member arrays (PR #79986)

2017-03-21 Thread Jason Merrill
On Tue, Mar 21, 2017 at 11:08 AM, Martin Sebor wrote: > On 03/20/2017 10:27 PM, Jason Merrill wrote: >> >> On Mon, Mar 20, 2017 at 7:58 PM, Martin Sebor wrote: >>> >>> On 03/20/2017 05:51 PM, Jason Merrill wrote: On Mon, Mar 20, 2017 at 7:04 PM, Martin Sebor wrote: > > > At

Re: [PATCH] have chkp skip flexible member arrays (PR #79986)

2017-03-21 Thread Marek Polacek
On Tue, Mar 21, 2017 at 09:08:49AM -0600, Martin Sebor wrote: > On 03/20/2017 10:27 PM, Jason Merrill wrote: > > On Mon, Mar 20, 2017 at 7:58 PM, Martin Sebor wrote: > > > On 03/20/2017 05:51 PM, Jason Merrill wrote: > > > > On Mon, Mar 20, 2017 at 7:04 PM, Martin Sebor wrote: > > > > > > > > >

Re: [PATCH] have chkp skip flexible member arrays (PR #79986)

2017-03-21 Thread Jeff Law
On 03/21/2017 09:15 AM, Jakub Jelinek wrote: On Tue, Mar 21, 2017 at 09:08:49AM -0600, Martin Sebor wrote: As I understand the schedule, the release is expected sometime in early April. I leave on April 2 for a week, so I have only until then. I don't think that leaves enough time. I'd be unc

Re: [PATCH] have chkp skip flexible member arrays (PR #79986)

2017-03-21 Thread Jakub Jelinek
On Tue, Mar 21, 2017 at 09:08:49AM -0600, Martin Sebor wrote: > As I understand the schedule, the release is expected sometime > in early April. I leave on April 2 for a week, so I have only > until then. I don't think that leaves enough time. I'd be > uncomfortable taking on a project this late

Re: [PATCH] have chkp skip flexible member arrays (PR #79986)

2017-03-21 Thread Martin Sebor
On 03/20/2017 10:27 PM, Jason Merrill wrote: On Mon, Mar 20, 2017 at 7:58 PM, Martin Sebor wrote: On 03/20/2017 05:51 PM, Jason Merrill wrote: On Mon, Mar 20, 2017 at 7:04 PM, Martin Sebor wrote: Attached is a minimal patch to avoid an ICE in CHKP upon encountering one form of an initialize

Re: [PATCH] have chkp skip flexible member arrays (PR #79986)

2017-03-20 Thread Jason Merrill
On Mon, Mar 20, 2017 at 7:58 PM, Martin Sebor wrote: > On 03/20/2017 05:51 PM, Jason Merrill wrote: >> On Mon, Mar 20, 2017 at 7:04 PM, Martin Sebor wrote: >>> >>> Attached is a minimal patch to avoid an ICE in CHKP upon >>> encountering one form of an initializer for a flexible array >>> member,

Re: [PATCH] have chkp skip flexible member arrays (PR #79986)

2017-03-20 Thread Martin Sebor
On 03/20/2017 05:51 PM, Jason Merrill wrote: On Mon, Mar 20, 2017 at 7:04 PM, Martin Sebor wrote: Attached is a minimal patch to avoid an ICE in CHKP upon encountering one form of an initializer for a flexible array member, specifically the empty string: int f () { struct B { int n; ch

Re: [PATCH] have chkp skip flexible member arrays (PR #79986)

2017-03-20 Thread Jason Merrill
On Mon, Mar 20, 2017 at 7:04 PM, Martin Sebor wrote: > Attached is a minimal patch to avoid an ICE in CHKP upon > encountering one form of an initializer for a flexible array > member, specifically the empty string: > > int f () > { > struct B { int n; char a[]; }; > > return ((struct

[PATCH] have chkp skip flexible member arrays (PR #79986)

2017-03-20 Thread Martin Sebor
Attached is a minimal patch to avoid an ICE in CHKP upon encountering one form of an initializer for a flexible array member, specifically the empty string: int f () { struct B { int n; char a[]; }; return ((struct B){ 1, "" }).a[0]; } Although GCC accepts (and doesn't ICE on) non