I have 2 files each containing a static int variable which has the same name :
test-1.cpp:
#include "test-2.cpp"
static int a;
int main() {
}
test-2.cpp:
static int a;
void fonction() {
}
When I compile with cl test-1.cpp
on command line, I get this error:
test-1.cpp(3): error C2086: 'int a' : redefinition