Re: Align a POD srtuct on the stack (aliasing issue with gcc 4.6+)

2013-01-06 Thread H.J. Lu
On Sat, Jan 5, 2013 at 7:00 PM, pps . wrote: > Question: How can I allocate random amount of stack space (using char > arrays or alloca, and then align pointer to that stack space and > reinterpret this chunk of memory as some structure that has some well > defined layout that guarantees alignment

Re: Align a POD srtuct on the stack (aliasing issue with gcc 4.6+)‏

2013-01-06 Thread Larry Evans
On 01/05/13 21:00, pps . wrote: > Question: How can I allocate random amount of stack space (using char > arrays or alloca, and then align pointer to that stack space and > reinterpret this chunk of memory as some structure that has some well > defined layout that guarantees alignment of certain

Re: Align a POD srtuct on the stack (aliasing issue with gcc 4.6+)

2013-01-06 Thread Richard Biener
On Sun, Jan 6, 2013 at 4:00 AM, pps . wrote: > Question: How can I allocate random amount of stack space (using char > arrays or alloca, and then align pointer to that stack space and > reinterpret this chunk of memory as some structure that has some well > defined layout that guarantees alignment

RE: Align a POD srtuct on the stack (aliasing issue with gcc 4.6+)‏

2013-01-05 Thread pps .
> > Question: How can I allocate random amount of stack space (using char > arrays or alloca, and then align pointer to that stack space and > reinterpret this chunk of memory as some structure that has some well > defined layout that guarantees alignment of certain variables as long > as the struc

Align a POD srtuct on the stack (aliasing issue with gcc 4.6+)‏

2013-01-05 Thread pps .
Question: How can I allocate random amount of stack space (using char arrays or alloca, and then align pointer to that stack space and reinterpret this chunk of memory as some structure that has some well defined layout that guarantees alignment of certain variables as long as the structure its