ValveSoftware / source-sdk-2013

The 2013 edition of the Source SDK
https://developer.valvesoftware.com/wiki/SDK2013_GettingStarted
Other
3.73k stars 1.99k forks source link

Narrowing error during compilation with GCC 6 #407

Open kiroma opened 7 years ago

kiroma commented 7 years ago

For some reason, in following line: static ALIGN16 int32 signmask[4]={0x80000000,0x80000000,0x80000000,0x80000000}; (located in src/raytrace/trace2.cpp at line 45) 0x80000000 is converted by compiler to 2147483648u, which throws a narrowing error. There are also several more locations where this error occurs, is there any workaround for this, or am I doing something wrong? I tried to follow this guide.

Nephyrin commented 7 years ago

The current SDK release targets GCC 4.8. A future SDK update will fix GCC 6 / Clang 3.9 compilation out of the box. Until then you may need to make some tweaks or try with -Wno-narrowing to get things working.

CarePackage17 commented 3 years ago

It'd be nice to have that future sdk update for sure.