From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19660 invoked by alias); 13 Feb 2006 22:42:23 -0000 Received: (qmail 19609 invoked by uid 48); 13 Feb 2006 22:42:18 -0000 Date: Mon, 13 Feb 2006 22:42:00 -0000 Message-ID: <20060213224218.19608.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug middle-end/22275] [3.4/4.0/4.1/4.2 Regression] bitfield layout change In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "mmitchel at gcc dot gnu dot org" 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 X-SW-Source: 2006-02/txt/msg01423.txt.bz2 List-Id: ------- Comment #48 from mmitchel at gcc dot gnu dot org 2006-02-13 22:42 ------- I'm going to comment on the behavior issue raised in the comments from David Moore, and then review the patch itself. First, the C standard has nothing to say about this issue; even were it not for the fact that the change only occurs within the scope of #pragma pack, both behaviors are conformant. Second, the ABI standards have nothing to say about this issue, because (so far as I am aware) none of them discuss #pragma pack. If the current behavior (i.e., GCC 4.1 as of today) had been the behavior of GCC for all time, I would not be in favor of making a change -- even though I think the current behavior is peculiar. However, the current behavior is itself a change; we need to resolve the situation once and for all, and we might as well do what seems best. As Michael and I have agreed, it seems to make sense that the zero-width bitfield directives have meaning based on their types; that makes the GNU-extended language (including #pragma pack) more expressive. I understand the user perception/marketing issue around ABI stability, and that's very important to me as well. However, this is very much a corner case (given the fact that #pragma pack is involved), and I think there are sound technical arguments for the change. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22275