|
|
|
|
|
by chrisco255
498 days ago
|
|
A byte isn't the minimum granularity for a pointer. The minimum is based on whatever target you're compiling for. If it's a 32-bit target platform, then the minimum granularity is 4 bytes. Why should pointer size determine value size though? It's super fast to shift bits around, too, when needed. |
|
Huh? How do you think `const char *s = "Hello"; const char *t = &s[1];` works?
> Why should pointer size determine value size though?
Because you should be able to take the address of any value, and addresses have byte granularity.