digitalmars.D - Re: Undefined behaviours in D and C
- Sean Kelly <sean invisibleduck.org> Apr 20 2010
bearophile Wrote:In the stdint.h of C99 there is (optionally) uintptr_t that's is an unsigned int that is large enough to contain a pointer (there is a intptr_t too, signed). In C99 you use that to convert a pointer to an integral. I don't know if D specs assert that D size_t is wide enough to represent a pointer.
There's uintptr_t in D std lib too, I have to start using it: http://www.digitalmars.com/d/2.0/phobos/std_stdint.html
I suggest using core.stdc if you're using D2: http://dsource.org/projects/druntime/browser/trunk/import/core/stdc/stdint.d
Apr 20 2010