OpenArena / engine

OpenArena modifications to the ioquake3 engine
http://openarena.ws
GNU General Public License v2.0
212 stars 50 forks source link

Sago anti crash #29

Closed sago007 closed 7 years ago

sago007 commented 7 years ago

I have made a bunch of changes to make the game more portable. This was mainly to find other Linux 64 bit problems but I might have found the https://github.com/OpenArena/engine/issues/4 bug as well.

sago007 commented 7 years ago

Looks like I have hit a problem with my local compiler defaulting to C99 and Travis compiling in C89 mode.

Are there any other compilers that will have trouble with C99? (I am mainly thinking about Microsoft compilers here). @leilei- what compiler do you use?

While the VM code is forced to C89 due to the qvm compiler the engine could benefit greatly from a newer, more reliable standard.

sago007 commented 7 years ago

I tried changing the C standard choice to "gnu99". It does allow more modern and safer approaches to problems but it depends on the weakest compiler in the chain. I don't know if there is an Windows 9x compiler that supports it for instance.

leilei- commented 7 years ago

Just compiled it (the newly pushed into engine revision) and tested on Windows 95 (w/ emulated Cyrix6x86MX ), it still works fine as intended. :+1:

FYI I use GCC 4.7.2, and I specifically use this version to compile an emulator. Whether a GCC this old can recognize that flag or not i'm not sure.

sago007 commented 7 years ago

Travis uses GCC 4.6.3 so it seems all good. I'll merge it.