Jakub Jelinek :
> On Mon, Nov 10, 2014 at 12:52:02AM -0800, Martin Uecker wrote:
> > Jakub Jelinek :
...
> > The warning seems very useful to me and can easily be turned off.
> > Or one could add -W(no-)warn-struct-hack if really needed.
> >
> > Another odd case is:
> >
> > struct h0b {
> >
On Mon, Nov 10, 2014 at 12:52:02AM -0800, Martin Uecker wrote:
> Jakub Jelinek :
> > On Mon, Nov 10, 2014 at 12:20:03AM -0800, Martin Uecker wrote:
> > > There is also no warning in the following example
> > > when the array is the last element of a struct.
> > >
> > > struct h3 {
> > > in
Jakub Jelinek :
> On Mon, Nov 10, 2014 at 12:20:03AM -0800, Martin Uecker wrote:
> > There is also no warning in the following example
> > when the array is the last element of a struct.
> >
> > struct h3 {
> > int i;
> > int j[3];
> > };
> >
> > struct h3* h3 = malloc(sizeof(stru
On Mon, Nov 10, 2014 at 12:20:03AM -0800, Martin Uecker wrote:
> There is also no warning in the following example
> when the array is the last element of a struct.
>
> struct h3 {
> int i;
> int j[3];
> };
>
> struct h3* h3 = malloc(sizeof(struct h) + 3 * sizeof(int));
> h3->j[4]