# HG changeset patch # User Bram Moolenaar # Date 1641586503 -3600 # Node ID 686fa11647247563d1288a1333317ea88a24522f # Parent c0647304fb69a801aca60def1585143afa0ebde8 patch 8.2.4032: ATTRIBUTE_NORETURN is not needed Commit: https://github.com/vim/vim/commit/e12406526a24768e6121450112eb2f9f92445ac5 Author: ichizok Date: Fri Jan 7 20:01:07 2022 +0000 patch 8.2.4032: ATTRIBUTE_NORETURN is not needed Problem: ATTRIBUTE_NORETURN is not needed. Solution: Use NORETURN(). (Ozaki Kiichi, closes https://github.com/vim/vim/issues/9487) diff --git a/src/if_ruby.c b/src/if_ruby.c --- a/src/if_ruby.c +++ b/src/if_ruby.c @@ -502,7 +502,11 @@ static int (*dll_rb_w32_snprintf)(char*, # endif # endif # if RUBY_VERSION >= 31 -static void (*dll_rb_unexpected_type) (VALUE, int) ATTRIBUTE_NORETURN; +# ifdef _MSC_VER +static void (*dll_rb_unexpected_type) (VALUE, int); +# else +NORETURN(static void (*dll_rb_unexpected_type) (VALUE, int)); +# endif # endif # if RUBY_VERSION >= 18 static char * (*dll_rb_string_value_ptr) (volatile VALUE*); diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -751,6 +751,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 4032, +/**/ 4031, /**/ 4030, diff --git a/src/vim.h b/src/vim.h --- a/src/vim.h +++ b/src/vim.h @@ -2178,15 +2178,13 @@ typedef struct stat stat_T; #endif #if defined(__GNUC__) || defined(__clang__) -# define likely(x) __builtin_expect((x), 1) -# define unlikely(x) __builtin_expect((x), 0) -# define ATTRIBUTE_COLD __attribute__((cold)) -# define ATTRIBUTE_NORETURN __attribute__((noreturn)) +# define likely(x) __builtin_expect((x), 1) +# define unlikely(x) __builtin_expect((x), 0) +# define ATTRIBUTE_COLD __attribute__((cold)) #else # define unlikely(x) (x) # define likely(x) (x) # define ATTRIBUTE_COLD -# define ATTRIBUTE_NORETURN #endif typedef enum {