P3477R0: There are exactly 8 bits in a byte

http://wg21.link/P3477r0

A new proposal for C/C++ to force bytes to be 8 bits wide

41 points · 3 comments · view on lemmy.world

3 Comments

sevon@lemmy.kde.social · 33 pts · 1y

I was vaguely aware that some ancient architectures had weird byte widths, but I did not know about this. Pretty interesting.

This paper cannot succeed without mentioning the PDP-10 (though noting that PDP-11 has 8-bit bytes), and the fact that some DSPs have 24-bit or 32-bit words treated as "bytes." These architectures made sense in their era, where word sizes varied and the notion of a byte wasn’t standardized. Today, nearly every general-purpose and embedded system adheres to the 8-bit byte model. The question isn’t whether there are still architectures where bytes aren’t 8-bits (there are!) but whether these care about modern C++... and whether modern C++ cares about them.

lungdart@lemmy.ca · 8 pts · 1y (1 reply)

I can see this being a breaking change for some strange edge cases and (ab)uses.

actually@lemmy.world · 2 pts · 1y

Parity bit