[ragel-users] Debugging colm for win32.

Bob Paddock graceindustries at gmail.com
Tue Apr 1 20:20:11 UTC 2014

> This isn't true in C. In C the only well-defined way to convert a pointer to
> an integer and back again is via intptr_t or uintptr_t.
> Does C++ really require the same behavior for size_t?

cstdint.hpp from Boost, which is what I have at hand says:

// intptr_t/uintptr_t are defined separately because they are optional
and not universally available

size_t and relatives should always be available unless using compilers
that are not compliant to standards and don't come with stdint.h .

Alas pointers are mine fields due to the varying widths, such as this
from the C99 Standard:

               * You may not even convert a void * to a function
               * pointer by explicit casting (|1).
               * C's abstract machine does not assume that code and
               * data are addressed the same way, so as far as C is
               * concerned function pointers and data pointers have
               * nothing to do with each other (they could have
               * different widths).
Which can lead to the sickening mess of pointer decoration that has no
standard between compilers.

The bottom line is it is always wrong to use (long) long as a pointer
type.  What to use in its place depends on the tools being used.

ragel-users mailing list
ragel-users at complang.org

More information about the ragel-users mailing list