monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Monotone-devel] pointer arithmetics in C++


From: Kelly F. Hickel
Subject: RE: [Monotone-devel] pointer arithmetics in C++
Date: Fri, 15 Sep 2006 22:04:07 -0500

> 
> > Except that this assumes that pointers and integers are the same
width
> > on your machine, i.e., it's not 64-bit safe, which is Bad.
> 
> size_t is the size of a pointer in all sane ABIs (i.e. everything
> except weird embedded chips and 64-bit Windows); if you have C99's
> inttypes.h and/or stdint.h, intptr_t there is guaranteed to be the
> size of a pointer, although it may not exist.
> 
> zw

You may not care about this (most sane people don't), but pointers in
ILE on the iSeries (formerly known as OS/400) are over 100 bits....
Can't remember if it's 128 or something bigger than that, but it will
throw you for a loop the first time you port C code.  Especially C code
that prints pointers with "%x" instead of "%p"....


-Kelly

> 
> 
> _______________________________________________
> Monotone-devel mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/monotone-devel




reply via email to

[Prev in Thread] Current Thread [Next in Thread]