🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

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

#1978
From: Tanmoy Bhattacharya
Date: Thu, 15 Feb 1996 03:14
27 lines
1931 bytes
In article <4fst7k$2gv@solutions.solon.com> Ari Lukumies
<aril@cmt.lpr.mail.carel.fi> writes: 
<snip>
   Standard states that sizeof(int) is the size of the register(s) used for arithmetics 
   and sizeof(long int) >= sizeof(int). Also, it's stated that sizeof(int) >= 
   sizeof(short int) >= sizeof(char). There is no statement to define the size of a 
   pointer related to anything.

Except for everything being >= sizeof(char), I do not think that the
standard makes any statements about the relative sizeof's. It defines
a larger integral type as one that is able to represent all values
representable in a smaller integral type of the same signedness. As
integral types can have unused bits, this does not directly say
anything about their size.

Whether the standard states it or not, it is likely to be the most
common implementation :-)

Cheers
Tanmoy
--
tanmoy@qcd.lanl.gov(128.165.23.46) DECNET: BETA::"tanmoy@lanl.gov"(1.218=1242)
Tanmoy Bhattacharya O:T-8(MS B285)LANL,NM87545 H:#9,3000,Trinity Drive,NM87544
Others see <gopher://yaleinfo.yale.edu:7700/00/Internet-People/internet-mail>,
<http://alpha.acast.nova.edu/cgi-bin/inmgq.pl>or<ftp://csd4.csd.uwm.edu/pub/
internetwork-mail-guide>. -- <http://nqcd.lanl.gov/people/tanmoy/tanmoy.html>
fax: 1 (505) 665 3003   voice: 1 (505) 665 4733    [ Home: 1 (505) 662 5596 ]
Technical Details
Message-ID: <4fu8f5$9ma@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>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!solon.com!not-for-mail
From: tanmoy@qcd.Lanl.GOV (Tanmoy Bhattacharya)
Newsgroups: comp.lang.c.moderated
Subject: Re: Why Use 'Int' Instead of 'Long'? (With today's compilers)
Date: 14 Feb 1996 21:14:45 -0600
Organization: Los Alamos National Laboratory
Sender: clc@solutions.solon.com
Approved: clc@solutions.solon.com
Message-ID: <4fu8f5$9ma@solutions.solon.com>
References: <4fjk00$nss@solutions.solon.com> <4fjp0k$p6m@solutions.solon.com>
 <4fp1o2$h99@solutions.solon.com> <4fst7k$2gv@solutions.solon.com>
NNTP-Posting-Host: solutions.solon.com