Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!ukc!edcastle!aipna!rjc From: rjc@uk.ac.ed.cstr (Richard Caley) Newsgroups: comp.lang.c Subject: Re: BSD bzero() & NULL Message-ID: Date: 15 Nov 90 07:34:51 GMT References: <1990Nov15.000129.27402@Think.COM> Sender: news@aipna.ed.ac.uk Organization: Center for Speech Technology Research Lines: 26 In-reply-to: barmar@think.com's message of 15 Nov 90 00:01:29 GMT In article <1990Nov15.000129.27402@Think.COM> barmar@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@uk.ac.ed.cstr _O_ |<