From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6595 invoked by alias); 31 Oct 2005 17:31:42 -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 6566 invoked by uid 48); 31 Oct 2005 17:31:37 -0000 Date: Mon, 31 Oct 2005 17:31:00 -0000 Message-ID: <20051031173137.6565.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug middle-end/22275] [3.4/4.0/4.1 Regression] bitfield layout change (regression?) In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "steven at gcc dot gnu dot org" X-SW-Source: 2005-10/txt/msg04157.txt.bz2 List-Id: ------- Comment #8 from steven at gcc dot gnu dot org 2005-10-31 17:31 ------- Right, I didn't know this wasn't opened until July of this year, sorry. I should have looked. I still am not sure whether this does break a documented ABI. Relevant texts in C99 are 6.2.6.1 sub 4, and 6.7.2.1 sub 3. The test case satisfies 6.7.2.1 sub 3, as far as I can tell: "The expression that specifies the width of a bit-field shall be an integer constant expression that has nonnegative value that shall not exceed the number of bits in an object of the type that is specified if the colon and expression are omitted. If the value is zero, the declaration shall have no declarator." Then, 6.2.6.1 sub 4 says: "Values stored in bit-fields consist of m bits, where m is the size specified for the bit-field. The object representation is the set of m bits the bit-field comprises in the addressable storage unit holding it." In our case, we have m==0. As far as I can tell (but I'm not exactly a C language lawyer ;-) the standard doesn't say anything about signed or unsigned bit-fields. So how should we interpret this... -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22275