Re: GCC aliasing extension for C

2017-09-18 Thread Richard Biener
On September 18, 2017 4:12:07 PM GMT+02:00, Andrew Haley wrote: >On 18/09/17 10:48, Florian Weimer wrote: >> Is this a property of the char type, or would other types work as >well, >> for example, double or long double? > >It has to be a character type, I believe. It can be any type. All store

Re: GCC aliasing extension for C

2017-09-18 Thread Andrew Haley
On 18/09/17 10:48, Florian Weimer wrote: > Is this a property of the char type, or would other types work as well, > for example, double or long double? It has to be a character type, I believe. -- Andrew Haley Java Platform Lead Engineer Red Hat UK Ltd. EAC8 43EB D3EF

GCC aliasing extension for C

2017-09-18 Thread Florian Weimer
I know that GCC implements a C extension (which is more or less required by POSIX) which allows you to define a buffer char buf[1024]; and then allocate objects from that (assuming that the buffer is sufficiently large and the pointers to subobjects are suitably aligned). In short, it is p