Re: [PR c++/84729] convert new init to array elt type

2018-03-22 Thread Jason Merrill
OK. On Wed, Mar 21, 2018 at 5:52 PM, Alexandre Oliva wrote: > On Mar 20, 2018, Jason Merrill wrote: > >>> -permerror (input_location, >>> - "parenthesized initializer in array new"); >>> +error_at (input_location, >>> +

Re: [PR c++/84729] convert new init to array elt type

2018-03-21 Thread Alexandre Oliva
On Mar 20, 2018, Jason Merrill wrote: >> -permerror (input_location, >> - "parenthesized initializer in array new"); >> +error_at (input_location, >> + "parenthesized initializer in array new"); > I suspect you'll n

Re: [PR c++/84729] convert new init to array elt type

2018-03-20 Thread Jason Merrill
he permerror into a hard error than improve >> support for a deprecated extension. > > Like this? > > [PR c++/84729] convert new init to array elt type > > A parenthesized initializer was only accepted when new()ing an array in > permissive mode. We were not careful, howeve

Re: [PR c++/84729] convert new init to array elt type

2018-03-20 Thread Alexandre Oliva
element type in this extension. >> This patch fixes it: after turning the TREE_LIST initializer to a >> compound_expr, we convert it to the base type. > I think I'd rather turn the permerror into a hard error than improve > support for a deprecated extension. Like this?

Re: [PR c++/84729] convert new init to array elt type

2018-03-20 Thread Jason Merrill
On Sat, Mar 10, 2018 at 6:57 AM, Alexandre Oliva wrote: > A parenthesized initializer is only accepted when new()ing an array in > permissive mode. We were not careful, however, to convert the > TREE_LIST initializer to the array element type in this extension. > This patch fixes it: after turnin

[PR c++/84729] convert new init to array elt type

2018-03-10 Thread Alexandre Oliva
A parenthesized initializer is only accepted when new()ing an array in permissive mode. We were not careful, however, to convert the TREE_LIST initializer to the array element type in this extension. This patch fixes it: after turning the TREE_LIST initializer to a compound_expr, we convert it to