BSD bzero() & NULL

Doug Gwyn gwyn at smoke.brl.mil
Fri Nov 16 05:44:59 AEST 1990


In article <RJC.90Nov15073451 at brodie.uk.ac.ed.cstr> rjc at uk.ac.ed.cstr (Richard Caley) writes:
>In article <1990Nov15.000129.27402 at Think.COM> barmar at think.com (Barry Margolin) writes:
>    Bzero can only be expected to work as expected
>    when the first argument is a pointer to an integral type.
>Just as a perverse question inspired by too much bad coffee, is this
>the case?

Yes, or to an aggregate whose (possibly recursive) scalar members are
all of integral type.

>Does the standard demand that the bit pattern for then integer 0 be
>`all zeros'.

Yup, or at least it is required to be indistinguishable from such a
representation so far as a strictly conforming program could determine.



More information about the Comp.lang.c mailing list