This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: C++ PATCH to reject initializating flexible array members in constructors (PR c++/72775)


On 12/08/2016 01:05 PM, Jason Merrill wrote:
If the problem is the member initializer, we can diagnose that
directly rather than wait until we're in a constructor.

What about:
struct Foo {
int a;
char ary[];
Foo () : ary ("bob"){}
};

?  That ICEs in the same way.

nathan

--
Nathan Sidwell


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]