Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

And you can take the address of a _Bool, so it must be addressable, so the least it could be is sizeof(bool) == 1.


I don't think "addressable" implies byte addressable or addressable by a single machine word. IIUC a bool* could be implemented as a byte pointer and a bit offset. Of course this then causes a cascade of things that you probably don't want like intptr_t getting at least 3 bits longer and size_t and related types may need to grow as well. So baking it a byte is the most practical choice.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: