From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19919 invoked by alias); 20 Aug 2004 12:50:41 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 19911 invoked by uid 48); 20 Aug 2004 12:50:40 -0000 Date: Fri, 20 Aug 2004 12:50:00 -0000 Message-ID: <20040820125040.19910.qmail@sourceware.org> From: "bangerth at dealii dot org" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20040819232250.17112.gene@digilicious.com> References: <20040819232250.17112.gene@digilicious.com> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/17112] default operator= for struct with packed bitfield is wrong X-Bugzilla-Reason: CC X-SW-Source: 2004-08/txt/msg02067.txt.bz2 List-Id: ------- Additional Comments From bangerth at dealii dot org 2004-08-20 12:50 ------- To see what really happens, here's a way to get a dump of the contents of the entire field: ------------------ #include using namespace std; struct myint24 { int int24:24 __attribute__ ((packed)); }; myint24 x[3] = { 0x010203, 0x040506, 0x070809 }; myint24 y[3]; // starts out as zeros int main(int ac, char* av[]) { y[1] = x[1]; for ( int i=0; i ./a.out 0 0 0 6 5 4 9 0 0 W. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17112