Given this sample code:
#define vX(a, ...) ((a)(__VA_ARGS__) ? 1 : 0)
{
int f();
vX(f);
}
I get error C2155: '?': invalid left operand, expected arithmetic or pointer type
On the other hand if I provide a second argument to the macro it compiles fin - eg.:
vX(f,1)
is OK. I'm compiling C code with the msvc compiler.
Sorry to bother everyone but the mistake was on my side - the 2 functions that were giving me error not only had no argument but were of void return type also - that was causing my problem and not anything macro related.