sizeof in 36-bits machines

Doug Gwyn gwyn at smoke.BRL.MIL
Thu Oct 19 20:39:47 AEST 1989


In article <10969 at riks.csl.sony.co.jp> diamond at ws.sony.junet (Norman Diamond) writes:
->>>Alternatively, you could just make sizeof(int)=sizeof(char)=1
-Doug Gwyn replied to the posting but did not comment on this sentence.

Yes, I did.

-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.

I also responded to Karl's followup that you cited.  Your last sentence
does not reflect what I said about the situation.



More information about the Comp.std.c mailing list