From b3533fc555e8e2702fab894f0e369cbc156051dc Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sat, 21 Dec 2002 19:31:18 +0000 Subject: [PATCH] add NORETURN --- stepmania/src/StdAfx.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/stepmania/src/StdAfx.h b/stepmania/src/StdAfx.h index 4dc28de6aa..d565bb5fcf 100644 --- a/stepmania/src/StdAfx.h +++ b/stepmania/src/StdAfx.h @@ -68,6 +68,18 @@ using namespace std; #define ASSERT assert #endif +/* Define a macro to tell the compiler that a function doesn't return. This just + * improves compiler warnings. This should be placed near the beginning of the + * function prototype (although it looks better near the end, VC only accepts it + * at the beginning). */ +#if defined(_MSC_VER) +#define NORETURN __declspec(noreturn) +#elif defined(__GNUC__) && defined(__attribute__) +#define NORETURN __attribute__ ((__noreturn__)) +#else +#define NORETURN +#endif + #if 1 #include "StdString.h"