[Bug c++/17519] New: Warning for array of packed non-POD in packed struct
timb at bluearc dot com
gcc-bugzilla@gcc.gnu.org
Thu Sep 16 12:10:00 GMT 2004
Compiling this with -Wall:
-----
struct A {
A();
} __attribute__((packed));
struct B {
A a[2];
} __attribute__((packed));
-----
gives:
test.cpp:6: warning: ignoring packed attribute on unpacked non-POD field `A B::a[2]'
A non-array packed non-POD member does not produce this warning. There is also
no warning if the packed attribute is removed from B and added to the array
declaration inside, even though declaring it on a struct is meant to be
equivalent to declaring it on each member.
May be related to bug 13983.
--
Summary: Warning for array of packed non-POD in packed struct
Product: gcc
Version: 3.4.2
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: timb at bluearc dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i486-linux
GCC host triplet: i486-linux
GCC target triplet: i486-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17519
More information about the Gcc-bugs
mailing list