alignment of array

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I need to change this:

char Array0[N] __attribute__ ((aligned (4)));
char Array1[M] __attribute__ ((aligned (4)));

In something like this:

typedef char myType_t __attribute__ ((aligned (4)));
myType_t Array0[N];
myType_t Array1[M];

but of course in this case the compiler gives me the following error
"alignment of array elements is greater than element size"

Is there a way to declare a type in such a way that ie Array0 and
Array1 are automatically aligned without using __attribute__ ?

thanks

-- 
È difficile non desiderare la donna d'altri, dato che quelle di
nessuno di solito sono poco attraenti. - Enzo Biagi

Massimiliano Cialdi
cialdi@xxxxxxxxx
m.cialdi@xxxxxxxx


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux