This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/26670] attribute((packed)) sometimes not ignored for non-PODs
- From: "debian-gcc at lists dot debian dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Mar 2006 23:53:42 -0000
- Subject: [Bug c++/26670] attribute((packed)) sometimes not ignored for non-PODs
- References: <bug-26670-5724@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from debian-gcc at lists dot debian dot org 2006-03-13 23:53 -------
It's not just a missing warning, it also changes behavior:
int& foo(nonpod_pack& n) {
return n.n.i; // this passes
}
int& foo(nonpod_pack2& p) {
return p.p.n.i; // this barfs
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26670