Sushi Tee wrote:i tested in 32 bit and 64 bit windows (cl) and in 32 bit and 64 bit linux (gcc)... was always 32bit long... the same for int. i guess its fine for all systems tw runs on
It's more about cpu architectures than about compilers - and the trial and error does not work here, if the C standard doesn't guarantee it, it shouldn't be used (that's probably why matricks sent the tunings as ints) - because you could miss a platform teeworlds runs on. You for example missed 'ppc' (if that's an architecture, found it in bam.lua)
TeePhoenix wrote:As far as I know, should float be always the standardized IEEE 754 single precision floating point number (maybe except of some really special compilers), which is always 32 bit long.
Except some really special compilers (or rather cpu architectures) - that's the exact problem I mentioned, this would result in very strange errors. Please do some research before posting, as far as I know it's also always 32bit, but I don't know for sure, that's why I wrote that one has to do some research about it, your answer didn't help at all.
TeePhoenix wrote:There should Sushi be right, but int isnt always 32 bit! Just have a look at this: http://en.cppreference.com/w/cpp/language/types Even if it is in most cases 32 bits long, you should consider to use uint32_t instead of int, because then you will get always an 32 bit int.
The only problem I see, that could happen is that big and little endian problem, that also would affect all integers (so it should still be solved somewhere else).
Thanks captain obvious... - You're talking to programmers.