1
0

Merge pull request #808 from worktycho/noreturn

Noreturn
This commit is contained in:
Mattes D 2014-03-14 16:16:33 +01:00
commit 763ea2840b
4 changed files with 14 additions and 3 deletions

View File

@ -198,7 +198,7 @@ macro(set_exe_flags)
add_flags_cxx("-Wno-error=covered-switch-default -Wno-error=shadow")
add_flags_cxx("-Wno-error=exit-time-destructors -Wno-error=missing-variable-declarations")
add_flags_cxx("-Wno-error=global-constructors -Wno-implicit-fallthrough")
add_flags_cxx("-Wno-missing-noreturn -Wno-error=unreachable-code")
add_flags_cxx("-Wno-error=unreachable-code")
endif()
endif()

View File

@ -200,7 +200,7 @@ public:
void Push(const HTTPTemplateRequest * a_Request);
void Push(cTNTEntity * a_TNTEntity);
void Push(Vector3i * a_Vector);
void Push(void * a_Ptr);
NORETURNDEBUG void Push(void * a_Ptr);
void Push(cHopperEntity * a_Hopper);
void Push(cBlockEntity * a_BlockEntity);

View File

@ -60,7 +60,7 @@ protected:
void CheckWorldAge(const AString & a_WorldName, Int64 a_Age);
/// Called when a deadlock is detected. Aborts the server.
void DeadlockDetected(void);
NORETURN void DeadlockDetected(void);
} ;

View File

@ -45,6 +45,8 @@
#define SIZE_T_FMT "%Iu"
#define SIZE_T_FMT_PRECISION(x) "%" #x "Iu"
#define SIZE_T_FMT_HEX "%Ix"
#define NORETURN __declspec(noreturn)
#elif defined(__GNUC__)
@ -69,6 +71,8 @@
#define SIZE_T_FMT "%zu"
#define SIZE_T_FMT_PRECISION(x) "%" #x "zu"
#define SIZE_T_FMT_HEX "%zx"
#define NORETURN __attribute((__noreturn__))
#else
@ -94,6 +98,13 @@
#endif
#ifdef _DEBUG
#define NORETURNDEBUG NORETURN
#else
#define NORETURNDEBUG
#endif
#include <stddef.h>