Re: [C PATCH] Handle typedef name as a flexible array member (PR c/64768)

2015-02-14 Thread Marek Polacek
On Fri, Feb 13, 2015 at 08:53:38PM +, Joseph Myers wrote: > On Fri, 13 Feb 2015, Marek Polacek wrote: > > > Since we had no testing for such cases whatsoever, I took existing flexible > > array member tests and duplicated them, only adjusted them to use a typedef > > name, so that we test as m

Re: [C PATCH] Handle typedef name as a flexible array member (PR c/64768)

2015-02-13 Thread Joseph Myers
On Fri, 13 Feb 2015, Marek Polacek wrote: > Since we had no testing for such cases whatsoever, I took existing flexible > array member tests and duplicated them, only adjusted them to use a typedef > name, so that we test as many scenarios as possible - I think this ought to > give us a reasonable

[C PATCH] Handle typedef name as a flexible array member (PR c/64768)

2015-02-13 Thread Marek Polacek
As discussed in the PR, the problem with this test case: typedef int A[]; struct S { int i; A a; }; is twofold. Firstly, we ICE with checking on, and secondly, we reject the testcase. But there's nothing wrong with using typedef name as a flexible array member. Turned out the problem was that