From 55f13da1f5eb0870854e8ae6a8e927b362427cd2 Mon Sep 17 00:00:00 2001 From: Aleksandr Mezin Date: Tue, 11 May 2021 22:01:04 +0600 Subject: [PATCH] gmacros.h: G_NORETURN: remove useless checks GCC >= 2.8 and MSVC >= 1200 are already handled by `#if` branches above. So: - `(__GNUC__ == 4 && __GNUC_MINOR__ >= 7)` is always false here - `!(__GNUC__ == 4 && __GNUC_MINOR__ == 7)` is always true - `(_MSC_VER >= 1900)` is always false --- glib/gmacros.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/glib/gmacros.h b/glib/gmacros.h index ca5682002..031ec2d44 100644 --- a/glib/gmacros.h +++ b/glib/gmacros.h @@ -1048,10 +1048,10 @@ /* Use MSVC specific syntax. */ # define G_NORETURN __declspec (noreturn) /* Use ISO C++11 syntax when the compiler supports it. */ -#elif (defined (__cplusplus) && __cplusplus >= 201103 && !(__GNUC__ == 4 && __GNUC_MINOR__ == 7)) || defined (_MSC_VER) && (_MSC_VER >= 1900) +#elif defined (__cplusplus) && __cplusplus >= 201103 # define G_NORETURN [[noreturn]] /* Use ISO C11 syntax when the compiler supports it. */ -#elif (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7) +#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112 # define G_NORETURN _Noreturn #else # define G_NORETURN /* empty */