This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
warning: ignoring packed attribute
- From: "M R Swami Reddy" <MR dot Swami dot Reddy at nsc dot com>
- To: "gcc-help at gcc dot gnu dot org" <gcc-help at gcc dot gnu dot org>
- Date: Tue, 16 Dec 2008 11:44:48 +0530
- Subject: warning: ignoring packed attribute
Hello,
With below test case, a warning message displayed by gcc - 4.3.2:
test case: test.c:
===
struct A {
char B;
unsigned char & C;
} __attribute__((packed));
unsigned char D;
A E = { 'F', D };
===
Command line:
> gcc test.c -S
test.c:2: warning: ignoring packed attribute because of unpacked non-POD field
âunsigned char& A::Câ
Could you please confirm, if the above warning is expected or its an issue with
gcc tool?
NOTE: With gcc 3.x tools, the above warning not observed.
Thanks you very much for your kind response.
Thanks
Swami