🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #776

Re: sizeof in 36-bits machines

#776
From: Norman Diamond
Date: Wed, 18 Oct 1989 01:45
22 lines
1647 bytes
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@haddock.ima.isc.com> karl@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@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".
Technical Details
Message-ID: <10969@riks.csl.sony.co.jp>
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!kddlab!titcca!sragwa!wsgw!socslgw!diamond
References: <272@ssp1.idca.tds.philips.nl> <11284@smoke.BRL.MIL> <398@cpsolv.UUCP> <11300@smoke.BRL.MIL> <14904@haddock.ima.isc.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!kddlab!titcca!sragwa!wsgw!socslgw!diamond
From: diamond@csl.sony.co.jp (Norman Diamond)
Newsgroups: comp.std.c
Subject: Re: sizeof in 36-bits machines
Message-ID: <10969@riks.csl.sony.co.jp>
Date: 18 Oct 89 01:45:55 GMT
References: <272@ssp1.idca.tds.philips.nl> <11284@smoke.BRL.MIL> <398@cpsolv.UUCP> <11300@smoke.BRL.MIL> <14904@haddock.ima.isc.com>
Reply-To: diamond@ws.sony.junet (Norman Diamond)
Organization: Sony Computer Science Laboratory Inc., Tokyo, Japan
Lines: 22