c++: Fix flexible array with synthesized constructor.
authorJason Merrill <jason@redhat.com>
Sun, 9 Feb 2020 23:47:34 +0000 (00:47 +0100)
committerJason Merrill <jason@redhat.com>
Mon, 10 Feb 2020 08:50:34 +0000 (09:50 +0100)
commit59dbb04df76da41f26192c2c219584fc3d6017cc
treeec482184d1fd95fedf476bdf3f847f3a38080263
parentfd789c816b06235b04698636db69e302b24c83ba
c++: Fix flexible array with synthesized constructor.

We were already rejecting initialization of a flexible array member in a
constructor; we similarly shouldn't try to clean it up.

PR c++/93618
* tree.c (array_of_unknown_bound_p): New.
* init.c (perform_member_init): Do nothing for flexible arrays.
gcc/cp/ChangeLog
gcc/cp/cp-tree.h
gcc/cp/init.c
gcc/cp/tree.c
gcc/testsuite/g++.dg/ext/flexary35.C [new file with mode: 0644]