Re:“C is quirky, flawed, and an enormous success” – Dennis R...
by messe on Sunday July 09, 2023 @06:12AM
(#36653184)
Not the commenter you're replying to, but I suspect what they mean is that the C memory model is byte-addressable not bit-addressable. You can't point/refer to a specific bit in memory, instead you have to first read the byte and then select an individual bit using bitwise operations, much like most modern processors.
[ Parent
| on HN ]
Re:“C is quirky, flawed, and an enormous success” – Dennis R...
by heywhatupboys on Sunday July 09, 2023 @07:37AM
(#36653644)
That has nothing to do with the C memory model, but how the CPU is structured. No modern CPU has an interface for bit-address accessing as far as I am aware...
C makes no assumptions about the size of a byte
Re:“C is quirky, flawed, and an enormous success” – Dennis R...
by Kamq on Sunday July 09, 2023 @12:52PM
(#36656121)
C doesn't really know about bytes. It has chars, but I believe there are some constraints on char, specifically, they have to be big enough to hold the ASCII charset. (I'm pulling real deep here, someone correct me if I'm wrong)
Re:“C is quirky, flawed, and an enormous success” – Dennis R...
by nitrix on Sunday July 09, 2023 @08:42PM
(#36660642)
C11 3.6p1 byte "addressable unit of data storage large enough to hold any member of the basic character set of the execution environment"
Re:“C is quirky, flawed, and an enormous success” – Dennis R...
by messe on Sunday July 09, 2023 @03:54PM
(#36658224)
If I remember correctly, it assumes the size of a char is greater than or equal to
seven bits, and a char is defined to be the smallest addressable unit.
C does not support bit-addressing.