sizeof in 36-bits machines

Norman Diamond diamond at csl.sony.co.jp
Wed Oct 18 11:45:55 AEST 1989


Some poster whose name was deleted:

>>>Alternatively, you could just make sizeof(int)=sizeof(char)=1

Doug Gwyn replied to the posting but did not comment on this sentence.

In article <14904 at haddock.ima.isc.com> karl at haddock.ima.isc.com (Karl Heuer) writes:

>It remains to be seen whether this is legal, and if so, what happens when the
>input stream contains a bit pattern that compares equal to the value of EOF.

There is a reason why Mr. Gwyn did not comment on that particular
sentence.  If sizeof(int)==sizeof(char), indeed it is possible that the
input stream might contain a bit pattern that compares equal to the
value of EOF.  The programmer must test feof().  I believe Mr. Gwyn
once remarked that he found this distasteful but got used to it.

-- 
Norman Diamond, Sony Corp. (diamond%ws.sony.junet at uunet.uu.net seems to work)
  Should the preceding opinions be caught or     |  James Bond asked his
  killed, the sender will disavow all knowledge  |  ATT rep for a source
  of their activities or whereabouts.            |  licence to "kill".



More information about the Comp.std.c mailing list