lkml.org 
[lkml]   [1999]   [Feb]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: Q: void* vs. unsigned long
Date
Followup to:  <XFMail.990215231913.jeremy@goop.org>
By author: Jeremy Fitzhardinge <jeremy@goop.org>
In newsgroup: linux.dev.kernel
>
>
> On 16-Feb-99 Brian Gerst wrote:
> > I thought it was int that changed with the word size of the
> > architecture, not long. Most C books I've seen said long is always 32
> > bits regardless of the word size.
>
> Throw them away.
>
> long is defined to be the longest integer type, long enough to hold any other
> integer value (which is why "long long" is inherently broken). Casting between
> void * and long is never portable, but a compiler implementer would be a fool
> to break it.
>

"long" *was* defined to be the longest integer type. Not anymore.
Get over it.

-hpa
--
"Linux is a very complete and sophisticated operating system. There
are, and will be, large numbers of applications available for it."
-- Paul Maritz, Group Vice President for Platforms And Applications,
Microsoft Corporation [Reference at: http://www.kernel.org/~hpa/ms.html]

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:50    [W:0.069 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site