unamed bit fields and other losses on v7 c
utzoo!decvax!ucbvax!unix-wizards
utzoo!decvax!ucbvax!unix-wizards
Sun Nov 22 09:41:23 AEST 1981
>From Lepreau at UTAH-20 Sun Nov 22 09:39:31 1981
Both the v7 & 4.1 versions of pcc support initialized bit fields,
which the Richie compiler does not. Only the 4.1 compiler supports
signed fields. HOWEVER, the C reference manual clearly states that
"implementations are not required to support anything but
integer [NB 'integer' not 'int'] fields. Moreover, even
'int' fields may be considered to be unsigned."
Moral: only use unsigned fields. Lint catches int's.
-------
More information about the Comp.unix.wizards
mailing list