source-sdk-2013
source-sdk-2013 copied to clipboard
Narrowing error during compilation with GCC 6
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.
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.
It'd be nice to have that future sdk update for sure.