Here is a macro I want to use, if X_DEFINED is defined it will be evaluated to DEFAULT_X otherwise it will be evaluated to x
#define GET_X(x) (defined(X_DEFINED) ? DEFAULT_X : x)
It doesn't compile, with the error
error: 'X_DEFINED' was not declared in this scope
Any suggestions? I want to be able to select between a parameter and a global variable based on if X_DEFINED was defined or not