News for hackers. Stuff that matters.
Re:Pointers Are Complicated, or What’s in a Byte? by dingo_bat on Wednesday July 25, 2018 @08:02AM (#17608585)
Can you explain this more? Surely the compiler can reason about p being able to point to i's address.
Re:Pointers Are Complicated, or What’s in a Byte? by dbaupp on Wednesday July 25, 2018 @08:27AM (#17608695)
p could be

  int *p = rand();
or that code could be in a function

  int f(int *p)
which may be called from completely different compilation units (or even across a dynamic library boundary) meaning there's no way for the compiler to know what p is.