src/stdafx.h
branchnoai
changeset 9624 b71483f2330f
parent 9601 b499fdd106d5
child 9626 79f2b5a0cdd7
--- a/src/stdafx.h	Fri May 11 15:13:08 2007 +0000
+++ b/src/stdafx.h	Fri May 25 00:25:08 2007 +0000
@@ -112,7 +112,6 @@
 # define FORCEINLINE inline
 # define CDECL
 # define __int64 long long
-# define NOT_REACHED() assert(0)
 # define GCC_PACK __attribute__((packed))
 
 # if (__GNUC__ == 2)
@@ -125,7 +124,6 @@
 # define NORETURN
 # define FORCEINLINE inline
 # define CDECL
-# define NOT_REACHED() assert(0)
 # define GCC_PACK
 # include <malloc.h>
 #endif /* __WATCOMC__ */
@@ -164,11 +162,6 @@
 # define FORCEINLINE __forceinline
 # define inline _inline
 # define CDECL _cdecl
-# if defined(_DEBUG)
-#  define NOT_REACHED() assert(0)
-# else
-#  define NOT_REACHED() _assume(0)
-# endif /* _DEBUG */
   int CDECL snprintf(char *str, size_t size, const char *format, ...);
 # if _MSC_VER < 1400
    int CDECL vsnprintf(char *str, size_t size, const char *format, va_list ap);
@@ -336,4 +329,12 @@
 # define Point OTTD_AMIGA_POINT
 #endif
 
+void
+#ifndef STRGEN
+/* In strgen error is not fatal and returns */
+NORETURN
+#endif /* STRGEN */
+CDECL error(const char *str, ...);
+#define NOT_REACHED() error("NOT_REACHED triggered at line %i of %s", __LINE__, __FILE__)
+
 #endif /* STDAFX_H */