Re: [PATCH] c++: Further tweaks for new-expression and paren-init [PR77841]

2020-09-07 Thread Jason Merrill via Gcc-patches
On 9/6/20 11:34 AM, Marek Polacek wrote: This patch corrects our handling of array new-expression with ()-init: new int[4](1, 2, 3, 4); should work even with the explicit array bound, and new char[3]("so_sad"); should cause an error, but we weren't giving any. Fixed by handling array n

[PATCH] c++: Further tweaks for new-expression and paren-init [PR77841]

2020-09-06 Thread Marek Polacek via Gcc-patches
This patch corrects our handling of array new-expression with ()-init: new int[4](1, 2, 3, 4); should work even with the explicit array bound, and new char[3]("so_sad"); should cause an error, but we weren't giving any. Fixed by handling array new-expressions with ()-init in the same spot