16 Nov
2009
16 Nov
'09
4:12 p.m.
Barry Smith wrote:
What about have configure look for uintptr_t if it does not exist then have configure check if unsigned long long is large enough, if not try size_t otherwise barf?
You're right, the compiler will warn about casting the pointer to an integer of different size, as in char *Align(char *ptr) { unsigned low = 0xf & (unsigned)ptr; return ptr - low + ((low+0xf) & ~0xf); } although I think this is actually okay (we are explicitly truncating it further, and I think it is guaranteed that the truncation preserves the low byte). By barf I assume you mean just skip the alignment fix-up. Jed
6114
Age (days ago)
6114
Last active (days ago)
0 comments
1 participants
participants (1)
-
Jed Brown