This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Altivec + 16 byte alignment


Geoff Keating wrote:-

> > Isn't an even better place to do it in the front end, just after parsing
> > the alignment request?
> 
> You could do it if you discovered that a user-requested stack local
> needed more alignment than assign_stack_local can currently give,
> but it's not clear to me that the front end will always have that
> information, and certainly it doesn't have it when it's just seen the
> alignment request; consider
> 
> struct foo {
>   int x __attribute__((aligned (512)));
> }
> 
> which might, or might not, end up on the stack.

You could diagnose that when the object of that type is declared, just
like we have to make other checks (particularly in C++) at that time.

Neil.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]