BSD bzero() & NULL

Richard Caley rjc at uk.ac.ed.cstr
Thu Nov 15 18:34:51 AEST 1990


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?

Well, ok, one can _expect_ anything.

Does the standard demand that the bit pattern for then integer 0 be
`all zeros'. If someone was perverse enough to write a compiler which
made the mapping from bit patterns to integers/chars be something
other than one of the obvious ones (2s complement, 1s complement, etc)
would this be in violation.

Obviously all the standard operation would have to work (the bitwise
ones would be the killer). The only real way to tell the difference
would be to write some data raw to file and read it using some other
system. 

``Perverted Minds Want to Know''

--
rjc at uk.ac.ed.cstr		_O_
				 |<



More information about the Comp.lang.c mailing list