#include <stdio.h>
#define NEG(x) -x
int main (void) {
printf ("% d\n", NEG (NEG (1)));
return 0;
}
Visual Studio Code says that NEG (NEG (1)) expands to --1.
If Visual Studio Code were correct, this code should contain a compilation error. In fact, no error will be thrown in compilation process because the C-preprocessor cpp.exe substitutes NEG (NEG (1)) for - -1.
Why cannot Visual Studio Code handle macro replacement correctly? Is this a bug of the C/C++ plugin of Visual Studio Code?

