[Bug c++/13983] no warning on some non-POD struct with packed attribute
--- Comment #12 from jason at gcc dot gnu dot org 2006-07-06 03:44 --- feexd -- jason at gcc dot gnu dot org changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13983
[Bug c++/13983] no warning on some non-POD struct with packed attribute
--- Comment #11 from jason at gcc dot gnu dot org 2006-07-06 03:33 --- Subject: Bug 13983 Author: jason Date: Thu Jul 6 03:33:20 2006 New Revision: 115220 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=115220 Log: PR c++/13983 PR c++/17519 * stor-layout.c (finish_record_layout): Copy TYPE_PACKED to variants. * cp/class.c (check_field_decls): Check TYPE_PACKED after stripping array types. Added: branches/gcc-4_0-branch/gcc/testsuite/g++.dg/ext/packed10.C - copied unchanged from r115219, branches/gcc-4_1-branch/gcc/testsuite/g++.dg/ext/packed10.C Modified: branches/gcc-4_0-branch/gcc/ChangeLog branches/gcc-4_0-branch/gcc/cp/ChangeLog branches/gcc-4_0-branch/gcc/cp/class.c branches/gcc-4_0-branch/gcc/stor-layout.c -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13983
[Bug c++/13983] no warning on some non-POD struct with packed attribute
--- Comment #10 from jason at gcc dot gnu dot org 2006-07-06 02:21 --- Subject: Bug 13983 Author: jason Date: Thu Jul 6 02:21:17 2006 New Revision: 115219 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=115219 Log: PR c++/13983 PR c++/17519 * stor-layout.c (finish_record_layout): Copy TYPE_PACKED to variants. * cp/class.c (check_field_decls): Check TYPE_PACKED after stripping array types. Added: branches/gcc-4_1-branch/gcc/testsuite/g++.dg/ext/packed10.C - copied unchanged from r115217, trunk/gcc/testsuite/g++.dg/ext/packed10.C Modified: branches/gcc-4_1-branch/gcc/ChangeLog branches/gcc-4_1-branch/gcc/cp/ChangeLog branches/gcc-4_1-branch/gcc/cp/class.c branches/gcc-4_1-branch/gcc/stor-layout.c -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13983
[Bug c++/13983] no warning on some non-POD struct with packed attribute
--- Comment #9 from jason at gcc dot gnu dot org 2006-07-06 02:09 --- Subject: Bug 13983 Author: jason Date: Thu Jul 6 02:09:02 2006 New Revision: 115217 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=115217 Log: PR c++/13983 PR c++/17519 * stor-layout.c (finish_record_layout): Copy TYPE_PACKED to variants. * c-common.c (handle_packed_attribute): So don't copy it here. * c-decl.c (finish_struct): Don't copy TYPE_ALIGN. * cp/class.c (check_field_decls): Check TYPE_PACKED after stripping array types. (finish_struct_bits): Don't copy TYPE_SIZE here. Added: trunk/gcc/testsuite/g++.dg/ext/packed10.C Modified: trunk/gcc/ChangeLog trunk/gcc/c-common.c trunk/gcc/c-decl.c trunk/gcc/cp/ChangeLog trunk/gcc/cp/class.c trunk/gcc/stor-layout.c -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13983
[Bug c++/13983] no warning on some non-POD struct with packed attribute
--- Comment #8 from mdorey at bluearc dot com 2006-03-16 04:31 --- (In reply to comment #5) > Nathan could you comment on this bug. Two years with no comment. Is it because the Severity is set to Enhancement? I'm convinced that the warning is incorrect, not missing, so I think the Severity should be Normal and (perhaps) the Summary shouldn't say "no warning". Perhaps another example would help to convince: [EMAIL PROTECTED]:~/playpen$ cat ignoring-packed.cpp template struct A { A(); } __attribute__((packed)); typedef A B; struct C { //A a; B b; } __attribute__((packed)); [EMAIL PROTECTED]:~/playpen$ g++-4.0 -c ignoring-packed.cpp ignoring-packed.cpp:10: warning: ignoring packed attribute on unpacked non-POD field ?B C::b? [EMAIL PROTECTED]:~/playpen$ With gcc version 4.0.3 (Debian 4.0.3-1). The commented-out line compiles fine, though it should be equivalent to the following line - the one which fails to compile. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13983
[Bug c++/13983] no warning on some non-POD struct with packed attribute
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-09-18 02:06 --- *** Bug 23833 has been marked as a duplicate of this bug. *** -- What|Removed |Added CC||Dmitry dot Chepel at acronis ||dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13983
[Bug c++/13983] no warning on some non-POD struct with packed attribute
--- Additional Comments From mdorey at bluearc dot com 2005-04-26 19:53 --- (In reply to comment #5) > Nathan could you comment on this bug. This bug may be related to http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17519 There's an interesting discussion in that bug, including comments from Nathan. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13983