# 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*);
#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 {