This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: C++ PATCH to reject initializating flexible array members in constructors (PR c++/72775)
- From: Nathan Sidwell <nathan at acm dot org>
- To: Jason Merrill <jason at redhat dot com>, Marek Polacek <polacek at redhat dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 8 Dec 2016 14:56:56 -0500
- Subject: Re: C++ PATCH to reject initializating flexible array members in constructors (PR c++/72775)
- Authentication-results: sourceware.org; auth=none
- References: <20161207202622.GJ2337@redhat.com> <CADzB+2=etFrn8H08i2nf-29vsCmEMob65Pp2q0zos_YLusUgOw@mail.gmail.com>
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