Does anyone know why the following code would compile as is in Visual Studio 2019 in 64-bit, but not in 32-bit when compiling as C? I suspect a quirk in the compiler, but would like to rule out anything I'm missing.
(Note that I know I can include for example stddef.h to get the definition of size_t, I'm more interested in why it would work in 64-bit)
int square() {
size_t i = 5;
return (int)i;
}
See the following links:
vs