diff --git a/hedley.h b/hedley.h index d084c7a..21771d6 100644 --- a/hedley.h +++ b/hedley.h @@ -1184,7 +1184,15 @@ HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) # define HEDLEY_NO_RETURN __attribute__((__noreturn__)) #elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L -# define HEDLEY_NO_RETURN _Noreturn +# if HEDLEY_HAS_WARNING("-Wpre-c11-compat") +# define HEDLEY_NO_RETURN \ + HEDLEY_DIAGNOSTIC_PUSH \ + _Pragma("clang diagnostic ignored \"-Wpre-c11-compat\"") \ + _Noreturn \ + HEDLEY_DIAGNOSTIC_POP +# else +# define HEDLEY_NO_RETURN _Noreturn +# endif #elif defined(__cplusplus) && (__cplusplus >= 201103L) # define HEDLEY_NO_RETURN HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[noreturn]]) #elif \