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=2.2 required=5.0 tests=BAYES_20,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: 103376,4873305131bf4d94 X-Google-Attributes: gid103376,public X-Google-Thread: 1014db,4873305131bf4d94 X-Google-Attributes: gid1014db,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/09 Message-ID: <873814018snz@genesis.demon.co.uk>#1/1 X-Deja-AN: 288830873 References: <345F49A2.5F5DC5A0@aom.ericsson.se> <63oadj$ljc$1@helios.crest.nt.com> <63se05$bgu$1@news.nyu.edu> 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 879117412 15108 fred genesis.demon.co.uk Organization: none Reply-To: fred@genesis.demon.co.uk Newsgroups: comp.lang.ada,comp.lang.c,comp.lang.c++ Date: 1997-11-09T00:00:00+00:00 List-Id: In article Dan.Pop@cern.ch "Dan Pop" writes: ... >It is theoretically possible to have an implementation with >sizeof(long) < sizeof(int) < sizeof(short), but even on that >implementation you must have SHRT_MAX <= INT_MAX <= LONG_MAX (otherwise >the integral promotion rules would stop working), so the types short and >int would make a very inefficient use of their allocated space. More directly it violates 6.1.2.5: "There are four signed integer types, designated as signed char, short int, int and long int ... ...In the list of signed integer types above, the range of values of each type is a subrange of the values of the next type in the list" -- ----------------------------------------- Lawrence Kirby | fred@genesis.demon.co.uk Wilts, England | 70734.126@compuserve.com -----------------------------------------