开发者

size_t is pointer size in practice

开发者 https://www.devze.com 2022-12-08 19:59 出处:网络
Let开发者_StackOverflow me first clarify that I am by now very familiar with definitions of size_t and intptr_t, and I don\'t want any repetitions of what they accomplish.

Let开发者_StackOverflow me first clarify that I am by now very familiar with definitions of size_t and intptr_t, and I don't want any repetitions of what they accomplish.

Instead I would like to know the following. Do you know of any platform, except x86/DOS (with its unbearable memory models) where the cast

void* a = ...;
size_t b = (size_t)a;

actually loses bits or bytes?

Thanks!


AFAIK, on AS/400 pointers are 128-bit, but size_t is defined to be 32-bit.

0

精彩评论

暂无评论...
验证码 换一张
取 消