RE: __attribute__((packed)) ?

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

 



Hi,

__attribute__((packed)) is used mainly to pack and align structures with
different data types
struct {
  /*  structures and  different data types */
} my_struct __attribute__ ((packed));

You've got a single pointer and there is nothing to pack there.

Konstantyn.

-----Original Message-----
From: kernelnewbies-bounce@nl.linux.org
[mailto:kernelnewbies-bounce@nl.linux.org]On Behalf Of amith
Sent: Wednesday, July 14, 2004 6:20 AM
To: KERNEL
Subject: __attribute__((packed)) ?


hi all,

this is off-topic, but please forgive me for this. i'am in a hurry !

/* test.c */

main()
{
        void **blkPtr __attribute__((packed)) ;
}

both
1) gcc test.c
2) arm-linux-gcc test.c  

gives me the same warning :

mine.c :3: warning:'packed' attribute ignored.

Any hints ?

cheers,
Amith

PS: even  
void __attribute__((packed)) **blkPtr;   doesnt work :-( !





--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux