Enable MZ_NORETURN annotation only if MZ_PRECISE_RETURN_SPEC is defined (#2823)

Unfortunately, MZ_NORETURN spec is causing a few problems - see #2808
It would be great to fix these but due to lack of time, this is a
workaround that should keep things working until all supported
configurations accept MZ_NORETURN properly.
This commit is contained in:
Paulo Matos 2019-09-17 08:36:04 +02:00 committed by GitHub
parent f61efeaf80
commit 3a512a2a60
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -253,7 +253,9 @@ extern "C"
#endif
#if !defined(MZ_NORETURN)
# if defined(__GNUC__) || defined(__clang__)
# if !defined(MZ_PRECISE_RETURN_SPEC)
# define MZ_NORETURN
# elif defined(__GNUC__) || defined(__clang__)
# define MZ_NORETURN __attribute__((noreturn))
# elif defined(_MSC_VER)
# define MZ_NORETURN __declspec(noreturn)