This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/17519] [3.4/4.0 Regression] Warning for array of packed non-POD in packed struct
- From: "nathan at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 14 Feb 2005 10:27:22 -0000
- Subject: [Bug c++/17519] [3.4/4.0 Regression] Warning for array of packed non-POD in packed struct
- References: <20040916121035.17519.timb@bluearc.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From nathan at gcc dot gnu dot org 2005-02-14 10:27 -------
The killer with packing in C++ is that it is so easy to silently take the
address of a field (pass by reference). Until we actually reflect unalignedness
in the type system *no* packing is really safe in C++.
That said, I don't see why the warning would be different for a packed non-array
member.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17519