Re: [PATCH] Fix PR c++/70332 (ICE due to aggregate initialization of NSDMI)

2016-03-23 Thread Jason Merrill
OK. Jason

Re: [PATCH] Fix PR c++/70332 (ICE due to aggregate initialization of NSDMI)

2016-03-23 Thread Patrick Palka
On Wed, 23 Mar 2016, Jason Merrill wrote: > On 03/22/2016 07:12 PM, Patrick Palka wrote: > > On Tue, Mar 22, 2016 at 6:12 PM, Patrick Palka wrote: > > > On Tue, Mar 22, 2016 at 6:00 PM, Jason Merrill wrote: > > > > On 03/22/2016 05:35 PM, Patrick Palka wrote: > > > > > > > > > > + i

Re: [PATCH] Fix PR c++/70332 (ICE due to aggregate initialization of NSDMI)

2016-03-23 Thread Jason Merrill
On 03/22/2016 07:12 PM, Patrick Palka wrote: On Tue, Mar 22, 2016 at 6:12 PM, Patrick Palka wrote: On Tue, Mar 22, 2016 at 6:00 PM, Jason Merrill wrote: On 03/22/2016 05:35 PM, Patrick Palka wrote: + if (cp_unevaluated_operand == 0 Why check this here? Just so that the chan

Re: [PATCH] Fix PR c++/70332 (ICE due to aggregate initialization of NSDMI)

2016-03-22 Thread Patrick Palka
On Tue, Mar 22, 2016 at 6:12 PM, Patrick Palka wrote: > On Tue, Mar 22, 2016 at 6:00 PM, Jason Merrill wrote: >> On 03/22/2016 05:35 PM, Patrick Palka wrote: >>> >>> + if (cp_unevaluated_operand == 0 >> >> >> Why check this here? > > Just so that the change doesn't affect the behavior

Re: [PATCH] Fix PR c++/70332 (ICE due to aggregate initialization of NSDMI)

2016-03-22 Thread Patrick Palka
On Tue, Mar 22, 2016 at 6:00 PM, Jason Merrill wrote: > On 03/22/2016 05:35 PM, Patrick Palka wrote: >> >> + if (cp_unevaluated_operand == 0 > > > Why check this here? Just so that the change doesn't affect the behavior of tsubst_decl() when cp_unevaluated_operand != 0. Presumably th

Re: [PATCH] Fix PR c++/70332 (ICE due to aggregate initialization of NSDMI)

2016-03-22 Thread Jason Merrill
On 03/22/2016 05:35 PM, Patrick Palka wrote: + if (cp_unevaluated_operand == 0 Why check this here? Jason

[PATCH] Fix PR c++/70332 (ICE due to aggregate initialization of NSDMI)

2016-03-22 Thread Patrick Palka
With c++14 an NSDMI no longer makes a class type non-aggregate so it's possible to perform aggregate initialization on a class that has an NSDMI, but tsubst_copy() currently ICEs on a use of 'this' in such a situation. This patch makes tsubst_copy() handle a use of 'this' in an NSDMI as part of an