How do I write a macro CHECK(a, b) that generates compilation error when the two pointers a & b have different base type.
CHECK((int*)0, (char*)0) -> compilation error
CHECK((int*)0, (int*)0) -> works
I'm looking for some C89 code, but C99 + gcc extensions will also do.