I have code that compiled in both gcc and vC ++. The code has a common macro that is called in two scenarios.
- When we pass it some parameters.
- If we do not want to pass him any parameters.
An example of such a code:
#define B(X) A1##X int main() { int B(123), B(); return 0; }
Expected output at the compilation preprocessing stage:
int main() { int A1123, A1; return 0; }
The output for gcc and vC ++ is as expected, but vC ++ gives a warning:
warning C4003: not enough actual parameters for macro 'B'
How to remove this warning and get the expected result?
Thanks.
source share