I’ve noticed that whenever I compile my code on another compiler, for example Clang (which I think is what Android Studio is using), I get undefined variable errors, because I didn’t include the definition. However on Visual Studio this isn’t the case. Even if I disable language extensions Visual Studio still compiles, even if (it seems) the definition is not given in that translation unit.
I understand, as I’ve been told, that MSVC is not exactly a conforming compiler, but something compiling code where a variable hasn’t even been defined doesn’t sound like something that’s possible. Does anyone know what’s happening?
1