diff options
-rw-r--r-- | src/util.h | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -25,8 +25,14 @@ #include <vector> using namespace std; +#ifdef _MSC_VER +#define NORETURN __declspec(noreturn) +#else +#define NORETURN __attribute__((noreturn)); +#endif + /// Log a fatal message and exit. -void Fatal(const char* msg, ...); +void Fatal(const char* msg, ...) NORETURN; /// Log a warning message. void Warning(const char* msg, ...); @@ -85,7 +91,7 @@ string ElideMiddle(const string& str, size_t width); string GetLastErrorString(); /// Calls Fatal() with a function name and GetLastErrorString. -void Win32Fatal(const char* function); +void Win32Fatal(const char* function) NORETURN; #endif #endif // NINJA_UTIL_H_ |