[parisc-linux] Usage of __attribute__?
Alan Modra
alan@linuxcare.com.au
Sun, 28 Jan 2001 21:15:57 +1100 (EST)
On Sat, 27 Jan 2001, John Marvin wrote:
> If I directly declare the type as follows:
>
> typedef int _lt_spinlock_t __attribute__((aligned(16)));
>
> then EVERY int that follows has the aligned 16 attribute, e.g. just
> declaring "int tmp;" gives tmp a 16 byte alignment. So, is that what
> you would expect from my above declaration?
Hi John,
I don't see this behaviour. I tried
typedef int _lt_spinlock_t __attribute__ ((aligned (16)));
int a;
int b;
_lt_spinlock_t c;
int d;
and got
.comm a,4,4
.comm b,4,4
.comm c,4,16
.comm d,4,4
ie. as expected. Can you post a testcase and version of gcc you used?
Alan Modra
--
Linuxcare. Support for the Revolution.