🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.c.moderated
Article #2062

Re: Why Use 'Int' Instead of 'Long'? (With today's compilers)

#2062
From: Jerry Coffin
Date: Sat, 17 Feb 1996 18:12
28 lines
1918 bytes
danpop@mail.cern.ch (Dan Pop) wrote:

>In <4fst7k$2gv@solutions.solon.com> aril@cmt.lpr.mail.carel.fi (Ari Lukumies) writes:

>>Standard states that sizeof(int) is the size of the register(s) used for arithmetics 

>Chapter and verse, please.  I couldn't find such a statement in the
>C standard and I'm typing this text on a machine where the size of an
>int is half the size of the integer registers.  This is actually very
>common, all people who run 16-bit code on 386 (or better) PC's are in
>the same situation.

AFAIK, the only thing that even comes close is ($6.1.2.5):

	A ``plain'' int object has the natural size suggested by the
	architecture of the execution environment (large enough to
	contain any value in the range INT_MIN to INT_MAX as 
	defined in the header <limits.h>).

but then, you already knew about that.  This doesn't use ``may'' so I
suppose it could be tajeo as real requirement, but "natural size
suggested by the execution environment" certainly sounds like a tough
clause to enforce to me.  

Since my first programming was done on a CDC mainframe, the natural size
_all_ execution environments suggest to me for integers is 60 bits.  I
guess it's a good thing I'm not in charge of accepting or rejecting
applications for C compiler certifications! <G>
Technical Details
Message-ID: <4g55qj$b83@solutions.solon.com>
Path: arc1-ca.pugleaf.net!solon.com!not-for-mail
References: <4fjk00$nss@solutions.solon.com> <4fjp0k$p6m@solutions.solon.com> <4fp1o2$h99@solutions.solon.com> <4fst7k$2gv@solutions.solon.com> <4fu7uk$9bc@solutions.solon.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!solon.com!not-for-mail
From: jcoffin@rmii.com (Jerry Coffin)
Newsgroups: comp.lang.c.moderated
Subject: Re: Why Use 'Int' Instead of 'Long'? (With today's compilers)
Date: 17 Feb 1996 12:12:35 -0600
Organization: TAEUS
Sender: clc@solutions.solon.com
Approved: clc@solutions.solon.com
Message-ID: <4g55qj$b83@solutions.solon.com>
References: <4fjk00$nss@solutions.solon.com> <4fjp0k$p6m@solutions.solon.com> <4fp1o2$h99@solutions.solon.com> <4fst7k$2gv@solutions.solon.com> <4fu7uk$9bc@solutions.solon.com>
NNTP-Posting-Host: solutions.solon.com
X-Newsreader: Forte Free Agent 1.0.82