fwrite man page "error"

Doug Gwyn gwyn at smoke.BRL.MIL
Wed Mar 8 12:28:50 AEST 1989


In article <1463 at mcgill-vision.UUCP> mouse at mcgill-vision.UUCP (der Mouse) writes:
>In article <939 at unh.UUCP>, jeff at unh.UUCP (Jeffrey E. F. Friedl) writes:
>> I suppose I should tell him that sizeof(char) is !always 1, though.
>	When sizeof is applied to a char, the result is 1; [...].
>I think the first edition contained something similar, though I'm not
>sure.  Do you know of any compilers which disagree?

K&R 1st Ed. Appendix A, generally taken as the de facto pre-ANSI C
standard, says that the units of sizeof are bytes, undefined by the
C language.  It also notes that in all existing (meaning AT&T) C
implementations byte and char are essentially synonymous.

The proposed ANSI C standard officially requires the identity between
the byte (sizeof unit) and the space used to hold a char.  There is
apparently a LOT of existing code that relied on that non-guaranteed
property, so X3J11 decided it would be a useful service to guarantee
it.  (I argued against that, for reasons posted to this newsgroup
some time ago.)



More information about the Comp.lang.c mailing list