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

C and C++ standards demand atomic access to individual chars.

It is not a given that a C/C++ char is a "byte" in the conventional modern understanding of that word, though. sizeof(char)==sizeof(bool)===sizeof(int)==1 is a perfectly valid arrangement for an architecture that is only capable of addressing machine words, and there have been such architectures historically although I'm not sure any are still around today.



Don't modern C and C++ standards mandate an 8-bit char now though?

EDIT: never mind, guess I misremembered! it's just mandated to be at least 8 bits




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

Search: