Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on What is C in practice?. Parent comment
int *f; *f = 2;
*f = 2;
f = &2;
The first of these is invalid C (undefined behavior) because it uses a value (the contents of f) before initialization.
The second is invalid C (compile error) because 2 is not an l-value (that is, it does not have a location).
Edited to add: I will note that I don't think there is any reason
There are no comments on this comment yet.
The first of these is invalid C (undefined behavior) because it uses a value (the contents of f) before initialization.
The second is invalid C (compile error) because 2 is not an l-value (that is, it does not have a location).
Edited to add: I will note that I don't think there is any reason
couldn't mean to give f the addess of 2, as by analogy to structural pattern matching, but that the syntax is already taken for something else.