File 0656-erts-Skip-ERTS_NOINLINE-on-non-GCC-compatible-compil.patch of Package erlang

From 0b6006dc4d2c9818c8d91ee364ed7d6aa660ed76 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?John=20H=C3=B6gberg?= <john@erlang.org>
Date: Mon, 8 Apr 2019 06:15:23 +0200
Subject: [PATCH] erts: Skip ERTS_NOINLINE on non-GCC-compatible compilers

__declspec(noinline) works fine on MSVC but requires us to place
the macro before a function rather than after, which in turn causes
early versions of GCC to puke since they only accept __attribute__
at the end of a function declaration.

Since this is a new macro that previously only saw use in beam_emu,
I figured it's easiest to leave it disabled on MSVC.
---
 erts/emulator/beam/sys.h               | 2 --
 erts/include/internal/ethread_inline.h | 2 +-
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/erts/emulator/beam/sys.h b/erts/emulator/beam/sys.h
index 24b6738e08..c261c8e117 100644
--- a/erts/emulator/beam/sys.h
+++ b/erts/emulator/beam/sys.h
@@ -66,8 +66,6 @@
 #ifndef ERTS_NOINLINE
 #  if ERTS_AT_LEAST_GCC_VSN__(3,1,1)
 #    define ERTS_NOINLINE __attribute__((__noinline__))
-#  elif defined(__WIN32__)
-#    define ERTS_NOINLINE __declspec(noinline)
 #  else
 #    define ERTS_NOINLINE
 #  endif
diff --git a/erts/include/internal/ethread_inline.h b/erts/include/internal/ethread_inline.h
index f25ba4ae72..791d7fa0ff 100644
--- a/erts/include/internal/ethread_inline.h
+++ b/erts/include/internal/ethread_inline.h
@@ -70,7 +70,7 @@
 #elif defined(__WIN32__)
 #  define ETHR_INLINE __forceinline
 #  define ETHR_FORCE_INLINE __forceinline
-#  define ETHR_NOINLINE __declspec(noinline)
+#  define ETHR_NOINLINE
 #endif
 
 #endif /* #ifndef ETHREAD_INLINE_H__ */
-- 
2.16.4