Detecting Integer Constant Expressions in Macros
Use the same idea, where the type of a ?: expression depends on whether an argument is a null pointer constant or an ordinary void *, but detect the type with _Generic: #define ICE_P(x) _Generic((1? (void *) ((x)*0) : (int *) 0), int*: 1, void*: 0) Demo on Ideone. _Generic is a C11 addition, so … Read more