include/openssl/e_os2.h: fix 'noreturn' pre-processor logic.
authorAndy Polyakov <appro@openssl.org>
Thu, 26 May 2016 21:10:56 +0000 (23:10 +0200)
committerAndy Polyakov <appro@openssl.org>
Fri, 27 May 2016 21:05:03 +0000 (23:05 +0200)
Newer gcc still recognizes e.g. -std=c9x in which case it wouldn't
have used 'noreturn' at all with original logic.

Reviewed-by: Richard Levitte <levitte@openssl.org>
include/openssl/e_os2.h

index eee632352ad272667e82548f9dea4af2a9b5b1a6..e0a5e46a6b33b62fdc73e96db6019d28bf848a4e 100644 (file)
@@ -293,10 +293,10 @@ typedef unsigned __int64 uint64_t;
 #  define ossl_inline inline
 # endif
 
-# if defined(__GNUC__) && (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 7))
-#  define ossl_noreturn __attribute__((noreturn))
-# elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
+# if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
 #  define ossl_noreturn _Noreturn
+# elif defined(__GNUC__) && __GNUC__ >= 2
+#  define ossl_noreturn __attribute__((noreturn))
 # else
 #  define ossl_noreturn
 # endif