Hacker News new | ask | show | jobs
by ufo 1918 days ago
Some explanation from Linus about how this trick works: https://lkml.org/lkml/2018/3/20/845
1 comments

"sizeof((void )1)"

"- this will break the minds of everybody who ever sees that expression."

It indeed broke my mind!

I am sure you meant

  sizeof((void*)1)
Given the italics, it wouldn’t surprise me if the original was in fact:

sizeof(*(void*)1)