On Wed, Jul 14, 2004 at 03:50:06PM +0530, amith wrote:mine.c :3: warning:'packed' attribute ignored.
It's a single pointer. What exactly is there for the compiler to pack?
Cheers,
Muli
hi there,
u r observations are right .
i was reading this FAQ on porting Linux applications to ARM. follows from http://www.arm.com/support/faqdev/1228.html
------------------------------------------------------------------------------------------------------------------------------------------------
Thus if you wish to define a pointer to a word that can be at any address (i.e. that can be at a non-natural alignment) then you must specify this using the __packed qualifier when defining the pointer:
__packed int *pi; // pointer to unaligned int
------------------------------------------------------------------------------------------------------------------------------------------------
later i learnt that __packed is recognised by armcc compiler , i tried using arm-linux-gcc , with __attribute__(packed)), assuming both do the same.
Could someone point out the gcc equivalent of __pack , i feel it doesnt make sense using __attribute__((packed)) on void **ptr.
cheers,
Amith