3 ms·
Of course I read that, or else I would have no idea they broke pointer round-tripping. I believe this violates C99 §7.18.1.4 (if the TruffleC language defines
by c99throwa2 11y ago
Of course I read that, or else I would have no idea they broke pointer round-tripping.
I believe this violates C99 §7.18.1.4 (if the TruffleC language defines the uintptr_t type in stdint.h):
The following type designates an unsigned integer type
with the property that any valid pointer to void can be
converted to this type, then converted back to pointer to
void, and the result will compare equal to the original
pointer:
uintptr_t
If the TruffleC language does not define uintptr_t ("these types are optional"), then hey, that's fine. A lot of valid code won't compile, though.
- mike_hearn 11y agoIs uintptr_t widely used? I don't recall ever seeing it before.
- david-given 11y agoIt's really useful if you want a type to which you can cast any (non-float) primitive value and know that you can cast it back to the same value you had before. I've used it as the cell type for a Forth interpreter, for example (where cells have to be able to represent addresses as well as integers). It's probably particularly not useful for general applications programming.