Hacker News new | ask | show | jobs
by dsamarin 2806 days ago
So I suppose that header = (struct header_t*)(block - 1); would be UB then.
1 comments

Haven't read the article but if block is void *, this won't compile because sizeof(void) is not defined. And they are probably trying to subtract the sizeof(struct header) hence the expression in your original comment.