Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!mit-eddie!genrad!decvax!mcnc!rti-sel!dg_rtp!throopw From: throopw@dg_rtp.UUCP (Wayne Throop) Newsgroups: comp.unix.wizards,comp.lang.c Subject: Re: bitfields Message-ID: <722@dg_rtp.UUCP> Date: Mon, 1-Dec-86 11:18:09 EST Article-I.D.: dg_rtp.722 Posted: Mon Dec 1 11:18:09 1986 Date-Received: Tue, 2-Dec-86 03:34:17 EST References: <844@sphinx.UChicago.UUCP> Followup-To: comp.lang.c Lines: 24 Summary: what? what? where do K&R say arrays of bitfields are allowed? Xref: mnetor comp.unix.wizards:212 comp.lang.c:199 (Note that this discussion in more properly a language discussion, not an OS discussion. I've therefore cross-posted, and set the followup to comp.lang.c.) > wmam@sphinx.UChicago.UUCP (tony mason) > [...] how are bit fields in C dealt with? As I read K&R arrays of bit > fields are allowed [...]. Has X3J11 come up with anything regarding > this? [...] Since K&R define array subscripting in terms of pointer arithmetic, and since taking the address of a bitfield is not allowed by K&R, how can you possibly conclude that bitfield arrays are allowed? Breifly, paraphrasing a lof of what I find in X3J11, bitfield definitions are legal only on struct members of integral type. Harbison and Steele warn that some compilers only allow bitfield modifiers on *unsigned* integral typed struct members. K&R say similar things. So again... what passage in K&R led you to think that arrays of bitfields were sensible in C? -- Sometimes I think the only universal in the computing field is the fetch-execute cycle. --- Alan J. Perlis -- Wayne Throop !mcnc!rti-sel!dg_rtp!throopw