Conditional operator with a constant (true) value?
问题 I was looking at some preprocessor macros used in OpenSSL, and I came across the following from crypto/stack/safestack.h : #define CHECKED_STACK_OF(type, p) \ ((_STACK*) (1 ? p : (STACK_OF(type)*)0)) #define CHECKED_SK_FREE_FUNC(type, p) \ ((void (*)(void *)) ((1 ? p : (void (*)(type *))0))) #define CHECKED_SK_FREE_FUNC2(type, p) \ ((void (*)(void *)) ((1 ? p : (void (*)(type))0))) I'm guessing its written that way to work around a compiler bug (probably something ancient that hasn't been