Re: C++ PATCH for c++/89686 - mixing init-capture and simple-capture in lambda

2019-03-13 Thread Jason Merrill
On 3/13/19 3:32 PM, Marek Polacek wrote: On Wed, Mar 13, 2019 at 02:15:25PM -0400, Jason Merrill wrote: On 3/12/19 5:42 PM, Marek Polacek wrote: On Tue, Mar 12, 2019 at 04:07:56PM -0400, Jason Merrill wrote: On 3/12/19 3:59 PM, Marek Polacek wrote: As Barry explained in the PR, lambda

Re: C++ PATCH for c++/89686 - mixing init-capture and simple-capture in lambda

2019-03-13 Thread Marek Polacek
On Wed, Mar 13, 2019 at 02:15:25PM -0400, Jason Merrill wrote: > On 3/12/19 5:42 PM, Marek Polacek wrote: > > On Tue, Mar 12, 2019 at 04:07:56PM -0400, Jason Merrill wrote: > > > On 3/12/19 3:59 PM, Marek Polacek wrote: > > > > As Barry explained in the PR, lambda capture is one of > > > > > > >

Re: C++ PATCH for c++/89686 - mixing init-capture and simple-capture in lambda

2019-03-13 Thread Jason Merrill
On 3/12/19 5:42 PM, Marek Polacek wrote: On Tue, Mar 12, 2019 at 04:07:56PM -0400, Jason Merrill wrote: On 3/12/19 3:59 PM, Marek Polacek wrote: As Barry explained in the PR, lambda capture is one of simple-capture ...[opt] ...[opt] init-capture where init-capture requires an

Re: C++ PATCH for c++/89686 - mixing init-capture and simple-capture in lambda

2019-03-12 Thread Marek Polacek
On Tue, Mar 12, 2019 at 04:07:56PM -0400, Jason Merrill wrote: > On 3/12/19 3:59 PM, Marek Polacek wrote: > > As Barry explained in the PR, lambda capture is one of > > > >simple-capture ...[opt] > >...[opt] init-capture > > > > where init-capture requires an initializer. Here we have >

Re: C++ PATCH for c++/89686 - mixing init-capture and simple-capture in lambda

2019-03-12 Thread Jason Merrill
On 3/12/19 3:59 PM, Marek Polacek wrote: As Barry explained in the PR, lambda capture is one of simple-capture ...[opt] ...[opt] init-capture where init-capture requires an initializer. Here we have [...xs...] which is ill-formed as it's mingling both of these.

C++ PATCH for c++/89686 - mixing init-capture and simple-capture in lambda

2019-03-12 Thread Marek Polacek
As Barry explained in the PR, lambda capture is one of simple-capture ...[opt] ...[opt] init-capture where init-capture requires an initializer. Here we have [...xs...] which is ill-formed as it's mingling both of these. Bootstrapped/regtested on x86_64-linux, ok for trunk? Or should