(defined(__GNUC_MAJOR__) && \
((__GNUC_MAJOR__ >= 3) || \
(__GNUC_MAJOR__ == 2) && (__GNUC_MINOR__ >= 5)))
-#define _Py_NO_RETURN __attribute__((__noreturn__))
+# define _Py_NO_RETURN __attribute__((__noreturn__))
+#elif defined(_MSC_VER)
+# define _Py_NO_RETURN __declspec(noreturn)
#else
-#define _Py_NO_RETURN
+# define _Py_NO_RETURN
#endif
/* Defined in Python/pylifecycle.c */
-PyAPI_FUNC(void) Py_FatalError(const char *message) _Py_NO_RETURN;
+PyAPI_FUNC(void) _Py_NO_RETURN Py_FatalError(const char *message);
#if defined(Py_DEBUG) || defined(Py_LIMITED_API)
#define _PyErr_OCCURRED() PyErr_Occurred()
#ifndef Py_LIMITED_API
PyAPI_FUNC(_PyInitError) _Py_InitializeFromConfig(
const _PyCoreConfig *config);
-PyAPI_FUNC(void) _Py_FatalInitError(_PyInitError err) _Py_NO_RETURN;
+PyAPI_FUNC(void) _Py_NO_RETURN _Py_FatalInitError(_PyInitError err);
#endif
PyAPI_FUNC(void) Py_Finalize(void);
PyAPI_FUNC(int) Py_FinalizeEx(void);
#endif
PyAPI_FUNC(int) Py_AtExit(void (*func)(void));
-PyAPI_FUNC(void) Py_Exit(int) _Py_NO_RETURN;
+PyAPI_FUNC(void) _Py_NO_RETURN Py_Exit(int);
/* Restore signals that the interpreter has called SIG_IGN on to SIG_DFL. */
#ifndef Py_LIMITED_API