Beautiful C

#JustCThings

I accidentally passed an integer instead of a pointer to a function. It compiled fine, no compiler warnings. It didn't even crash at runtime. It just didn't work.

Why?

Because the integer was a complex nested macro constant, including integer type casts, bit shifting, and masking, but in the end it resolved to...

zero.

Which is just a normal NULL pointer, not even UB, not even a compile warning.

#JustCThings