This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/17112] default operator= for struct with packed bitfield is wrong
- From: "bangerth at dealii dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 20 Aug 2004 12:45:36 -0000
- Subject: [Bug c++/17112] default operator= for struct with packed bitfield is wrong
- References: <20040819232250.17112.gene@digilicious.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From bangerth at dealii dot org 2004-08-20 12:45 -------
I don't know what the "right" behavior is (I would indeed have
expected that only one element of the array 'y' is nonzero), but
I get consistent results with icc8 as well as gcc 2.95, 3.2.3, 3.3.4,
3.4.1 and mainline, namely that 1 and 2 is printed. Note that this
really includes 3.2.3 as well, contrary to the claim in the original
report.
Someone with knowledge of the semantics of the packed attribute will
have to decide what is right and wrong here.
W.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17112