Starting with 4.8 the compiler includes -Wunused-local-typedefs by default, this causes public/tier0/dbg.h:558 to cause many errors.
To fix it one simply needs to change the line as follows:
Original:
#define COMPILE_TIME_ASSERT( pred ) typedef int UNIQUE_ID[ (pred) ? 1 : -1 ]
Fixed:
#define COMPILE_TIME_ASSERT( pred ) typedef int UNIQUE_ID[ (pred) ? 1 : -1 ] __attribute__((unused))
This attribute feature is available since 2.95 and therefore should cause no problems in all major versions.
PS:
BEGIN_NETWORK_TABLEBEGIN_NETWORK_TABLE_NOBASEBEGIN_SEND_TABLEBEGIN_RECV_TABLEIMPLEMENT_CLIENTCLASS_DTIMPLEMENT_SERVERCLASS_ST
macros seem to be affected as well.
There are also a bunch of -Wnarrowing and -Wdelete-non-virtual-dtor warnings and others that need to be taken care of which I don't know if they are actually related to 4.8 as well...
What stopped my compiling tough was some errors of my code hidden between this immense spam of warnings, so reducing them is a pretty good idea.
Starting with 4.8 the compiler includes
-Wunused-local-typedefs
by default, this causes public/tier0/dbg.h:558 to cause many errors. To fix it one simply needs to change the line as follows:Original:
#define COMPILE_TIME_ASSERT( pred ) typedef int UNIQUE_ID[ (pred) ? 1 : -1 ]
Fixed:
#define COMPILE_TIME_ASSERT( pred ) typedef int UNIQUE_ID[ (pred) ? 1 : -1 ] __attribute__((unused))
This attribute feature is available since 2.95 and therefore should cause no problems in all major versions.
PS:
BEGIN_NETWORK_TABLE
BEGIN_NETWORK_TABLE_NOBASE
BEGIN_SEND_TABLE
BEGIN_RECV_TABLE
IMPLEMENT_CLIENTCLASS_DT
IMPLEMENT_SERVERCLASS_ST
macros seem to be affected as well.There are also a bunch of
-Wnarrowing
and-Wdelete-non-virtual-dtor
warnings and others that need to be taken care of which I don't know if they are actually related to 4.8 as well... What stopped my compiling tough was some errors of my code hidden between this immense spam of warnings, so reducing them is a pretty good idea.