Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Some explanation from Linus about how this trick works: https://lkml.org/lkml/2018/3/20/845


"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)




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: