Re: aliasing between internal zero-length-arrays and other members

2018-06-05 Thread Jakub Jelinek
On Tue, Jun 05, 2018 at 01:38:21PM +0200, Richard Biener wrote: > On Tue, Jun 5, 2018 at 1:39 AM Martin Sebor wrote: > > > > GCC silently (without -Wpedantic) accepts declarations of zero > > length arrays that are followed by other members in the same > > struct, such as in: > > > >struct A {

Re: aliasing between internal zero-length-arrays and other members

2018-06-05 Thread Richard Biener
On Tue, Jun 5, 2018 at 1:39 AM Martin Sebor wrote: > > GCC silently (without -Wpedantic) accepts declarations of zero > length arrays that are followed by other members in the same > struct, such as in: > >struct A { char a, b[0], c; }; > > Is it intended that accesses to elements of such arra

aliasing between internal zero-length-arrays and other members

2018-06-04 Thread Martin Sebor
GCC silently (without -Wpedantic) accepts declarations of zero length arrays that are followed by other members in the same struct, such as in: struct A { char a, b[0], c; }; Is it intended that accesses to elements of such arrays that alias other members be well-defined? In my tests, GCC ass