Article View: comp.lang.c.moderated
Article #2035Re: Why Use 'Int' Instead of 'Long'? (With today's compilers)
From: Roland Giersig
Date: Fri, 16 Feb 1996 15:41
Date: Fri, 16 Feb 1996 15:41
20 lines
1488 bytes
1488 bytes
: In article <4fp1o2$h99@solutions.solon.com> dtrg@st-andrews.ac.uk
: (David Thomas Richard Given) writes:
: |> On a related note, is it a truism that sizeof(void *) == sizeof(long int)?
: |> It is on everything I've worked with, but is it universal?
I think what's more interesting:
is sizeof(void *) <= sizeof(long int) ?
^^
which means: can you cast a pointer to int an back without loosing
information? And that's where the *real* trouble starts! There is a
lot of supposedly portable code out there that makes this silent
assumption.
--
Roland.Giersig@aut.alcatel.at (speaking only to, err, for myself)
ALCATEL Austria, Scheydgasse 41, A-1210 WIEN. Phone: +43-1-27722-3755
GS/CS/IT d-(+) s++:++ a>? C++$ US*++$ P+>+++ L>++ E+>++ W+>$ N+ w--- V>?
PS+ PE Y+ PGP?>++ t++>+++ 5? tv+ b>++++ D++(---) G+ e+++>* h----(*) r+++
Technical Details
Message-ID:
<4g28ip$qlc@solutions.solon.com>Path:
arc1-ca.pugleaf.net!solon.com!not-for-mailReferences:
<4fjk00$nss@solutions.solon.com> <4fjp0k$p6m@solutions.solon.com> <4fp1o2$h99@solutions.solon.com> <4fvha2$e4r@solutions.solon.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!solon.com!not-for-mail From: giersig%atusel04@atusks01.aut.alcatel.at (Roland Giersig) Newsgroups: comp.lang.c.moderated Subject: Re: Why Use 'Int' Instead of 'Long'? (With today's compilers) Date: 16 Feb 1996 09:41:13 -0600 Organization: Alcatel Austria AG Sender: clc@solutions.solon.com Approved: clc@solutions.solon.com Message-ID: <4g28ip$qlc@solutions.solon.com> References: <4fjk00$nss@solutions.solon.com> <4fjp0k$p6m@solutions.solon.com> <4fp1o2$h99@solutions.solon.com> <4fvha2$e4r@solutions.solon.com> NNTP-Posting-Host: solutions.solon.com X-Newsreader: TIN [version 1.2 PL2]