This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA] Setting long long bitfields
- From: "Paul N. Hilfinger" <hilfingr at otisco dot mckusick dot com>
- To: Andreas Schwab <schwab at suse dot de>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Mon, 1 Nov 2004 01:42:22 -0800
- Subject: Re: [RFA] Setting long long bitfields
- Reply-to: Hilfinger at otisco dot mckusick dot com
> 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