This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/17519] New: Warning for array of packed non-POD in packed struct
- From: "timb at bluearc dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 Sep 2004 12:10:54 -0000
- Subject: [Bug c++/17519] New: Warning for array of packed non-POD in packed struct
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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