aboutsummaryrefslogtreecommitdiffstats
path: root/lib/builtins/emutls.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/builtins/emutls.c')
-rw-r--r--lib/builtins/emutls.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/builtins/emutls.c b/lib/builtins/emutls.c
index da58feb7b906..e0aa19155f7d 100644
--- a/lib/builtins/emutls.c
+++ b/lib/builtins/emutls.c
@@ -26,12 +26,23 @@
#define EMUTLS_SKIP_DESTRUCTOR_ROUNDS 0
#endif
+#if defined(_MSC_VER) && !defined(__clang__)
+// MSVC raises a warning about a nonstandard extension being used for the 0
+// sized element in this array. Disable this for warn-as-error builds.
+#pragma warning(push)
+#pragma warning(disable : 4206)
+#endif
+
typedef struct emutls_address_array {
uintptr_t skip_destructor_rounds;
uintptr_t size; // number of elements in the 'data' array
void *data[];
} emutls_address_array;
+#if defined(_MSC_VER) && !defined(__clang__)
+#pragma warning(pop)
+#endif
+
static void emutls_shutdown(emutls_address_array *array);
#ifndef _WIN32