Re:C pointers are not hardware pointers
by jibsen on Monday March 07, 2016 @02:43AM
(#11237630)
Even computing pointers that point outside an array can be undefined behavior, like f - 1 + 1.
It is easy for people who understand the relatively strong correlation between C and the assembly language it generates to assume such things work. Also, compiler vendors did let us get away with them for many years.
It is easy for people who understand the relatively strong correlation between C and the assembly language it generates to assume such things work. Also, compiler vendors did let us get away with them for many years.