News for hackers. Stuff that matters.
Re:Some things every C programmer should know about C (2002) by gpderetta on Monday December 09, 2019 @04:31PM (#21746834)
They do not have to. But then it wouldn't be C, which by design has a straight forward and obvious mapping to the underlying machine.

For example, there are machines (some DSPs) that individual octects are not efficiently addressable and usually a C byte in these machines is 16 or 32 bita.

Re:Some things every C programmer should know about C (2002) by dodobirdlord on Tuesday December 10, 2019 @02:35AM (#21750454)
Pointers are very much a language concept and very much not an architecture concept. I enjoy this particular writeup that touches on some of the distinctions. Of particular interest is the fact that the C standard itself states that two pointers are not equivalent simply by virtue of having the same address value.

https://www.ralfj.de/blog/2018/07/24/pointers-and-bytes.html

I also happen to very much enjoy this piece on how the C abstract machine has very little in common with modern architecture.

https://queue.acm.org/detail.cfm?id=3212479

Re:Some things every C programmer should know about C (2002) by ftvy on Monday December 09, 2019 @08:39PM (#21748808)
This exchange was an enjoyable read. C was designed for portability because they had those PSP computers or whatever they were but the problem is that each had its own unique architecture, switch arrangement for operation and maybe even endianess. I don't know. The whole point of the matter was to make a computer language portable enough by a person's desire to write a compiler for the architecture. Why people do not like that I can not comprehend.