I’m experiencing a strange phenomenon, where my code will compile and package fine for Windows, but when I try to compile for Android, it throws all the errors that the Windows version SHOULD have also thrown. For example: Role = ROLE_AUTHORITY compiled perfectly fine for Windows, and the game ran without issue (though never got to this line). When I tried to compile for Android, it told me (correctly) that it needs to be Role == ROLE_AUTHORITY.
I don’t understand this… surely the code has to be identical on both platforms to run successfully? It’s either right or it isn’t…
Well clang is prisen by its standard conformance and ability to spit out errors one can make sense of. The Microsoft compiler in its core is from the 80ies, they even admit it. It has much more trouble to conform to any standard and f.e. template related errors are horribly expressed in the error message.
Thats probably one of the reasons Mike Fricker makes himself work to support clang on Windows.
PS No I apparently have difficulties writing English today. I leave what I wrote above, but what I wanted to say is: clang is just better, MS CL is sh…
While it’s true Clang offers much better error messages, this one is certainly available in VC++. You should be seeing the following if compiling at /W4 (warning level 4):
Warning 1 warning C4706: assignment within conditional expression <file path> 274 1 CppTest
UE will even turn this warning to an error as per: engine\source\runtime\core\public\windows\WindowsPlatformCompilerSetup.h
It’s not so much that, it’s more that the Windows Compiler just plain skipped over what should have been a blatant error. I’m assuming harmlessly, but still.