From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4557 invoked by alias); 1 Nov 2004 09:42:37 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 4530 invoked from network); 1 Nov 2004 09:42:34 -0000 Received: from unknown (HELO otisco.McKusick.COM) (64.81.247.46) by sourceware.org with SMTP; 1 Nov 2004 09:42:33 -0000 Received: (from hilfingr@localhost) by otisco.McKusick.COM (8.11.6/8.11.6) id iA19gMl07486; Mon, 1 Nov 2004 01:42:22 -0800 Date: Mon, 01 Nov 2004 09:42:00 -0000 Message-Id: <200411010942.iA19gMl07486@otisco.McKusick.COM> From: "Paul N. Hilfinger" To: Andreas Schwab cc: gdb-patches@sources.redhat.com Subject: Re: [RFA] Setting long long bitfields Reply-to: Hilfinger@otisco.mckusick.com X-SW-Source: 2004-11/txt/msg00009.txt.bz2 > How can bitsize ever become zero? Note that the original code contains a > shift by bitsize - 1, which is undefined as well in this case. Actually, Ada programs, unlike C, can generate fields of width 0. I see, however, that (somewhat accidentally) that case is handled as a 0-byte ordinary byte-aligned field (where the alignment doesn't matter, of course, since 0 bytes of data are modified). Very well, I will adopt Andreas' suggestion, and also document the precondition in the comment. Thanks. Paul