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

This reply was wrong, removed.

Please downvote it to oblivion.



Every major CPU ISA still in use can, in fact, address individual bytes (C and C++ standards even demand atomic access).

It's just inefficient, but sometimes needed (MMIO, inter-cpu visible byte changes, etc)


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


You can just make stuff up on this website




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

Search: