Use noreturn attribute only when MZ_DECLARE_NORETURN

This commit is contained in:
Paulo Matos 2019-02-22 16:44:36 +01:00 committed by Matthew Flatt
parent 5b837b895f
commit ef8b31b527

View File

@ -252,10 +252,7 @@ extern "C"
{ {
#endif #endif
/* The reason we need two preprocessor variables is that, in gcc/clang the #if defined(MZ_DECLARE_NORETURN) && defined(__GNUC__)
function attribute comes after the function declaration. However,
in MSVC the function attribute comes before the function declaration. */
#ifdef __GNUC__
#define NORETURN __attribute__((__noreturn__)) #define NORETURN __attribute__((__noreturn__))
#else #else
#define NORETURN #define NORETURN