From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.3 required=5.0 tests=BAYES_00,INVALID_MSGID, PLING_QUERY,REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1014db,4873305131bf4d94 X-Google-Attributes: gid1014db,public X-Google-Thread: 103376,4873305131bf4d94 X-Google-Attributes: gid103376,public X-Google-Thread: fdb77,4873305131bf4d94 X-Google-Attributes: gidfdb77,public X-Google-Thread: 109fba,4873305131bf4d94 X-Google-Attributes: gid109fba,public From: fred@genesis.demon.co.uk (Lawrence Kirby) Subject: Re: How big is an int? (was: Yet another stupid language war (was: ... the only languages you need!!)) Date: 1997/11/06 Message-ID: <878820761snz@genesis.demon.co.uk>#1/1 X-Deja-AN: 287420189 References: <34557f2b.1934172@news.mindspring.com> <63oadj$ljc$1@helios.crest.nt.com> <63qkp9$bqr$3@darla.visi.com> <63r2sv$rgm$1@helios.crest.nt.com> X-Mail2News-User: fred@genesis.demon.co.uk X-Complaints-To: abuse@demon.net X-Mail2News-Path: genesis.demon.co.uk X-Trace: mail2news.demon.co.uk 878825569 27207 fred genesis.demon.co.uk Organization: none Reply-To: fred@genesis.demon.co.uk Newsgroups: comp.lang.ada,comp.lang.c,comp.lang.c++,comp.lang.java.advocacy,comp.lang.c,comp.lang.c++ Date: 1997-11-06T00:00:00+00:00 List-Id: In article <63r2sv$rgm$1@helios.crest.nt.com> kaz@helios.crest.nt.com "Kaz Kylheku" writes: >In article <63qkp9$bqr$3@darla.visi.com>, >Peter Seebach wrote: >>In article configured-system-so-shoot-me>, >> wrote: >>>Nor have you. The definitions are as follows. >> >>>short <= int <= long >>>short < long >>>short > char >> >>No. Short is not required to be any smaller than long, nor any larger >>than char. A system where all four types are 64-bits is conforming. > >But it cannot be a conforming hosted implementation, as I pointed out >in the other article, because the getc() and putc() functions require >the int type to represent everything in the range of 0 to UCHAR_MAX, >plus the extra value EOF. getc() and putc() return EOF if the operation fails. However I can find no guarantee that EOF is distinct from a valid character value returned by one of these functions, so I disagree that int has to be greater than char (specifically that INT_MAX >= UCHAR_MAX). However things are unpleasant if that isn't the case. -- ----------------------------------------- Lawrence Kirby | fred@genesis.demon.co.uk Wilts, England | 70734.126@compuserve.com -----------------------------------------