I'm trying to write some code that needs to compile/run in both visual studio and linux (gcc) environment. When I try to compile my file in windows I'm getting a somewhat ambiguous error, and I'm wondering if anyone can point me to what I'm missing... I have the standard macro:
#define __MAX(a,b) \
({ __typeof__ (a) _a = (a); \
__typeof__ (b) _b = (b); \
_a > _b ? _a : _b; })
And then when I try to invoke it:
int x = __MAX(0, 2);
I get an expected an expression
error in visual studio, pointing to this line. I'm new to visual studio, so I'm not sure what it's not liking about this. Can anyone point me to what I'm doing wrong?