aboutsummaryrefslogtreecommitdiff
path: root/lib/builtins/emutls.c
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2019-10-23 17:52:22 +0000
committerDimitry Andric <dim@FreeBSD.org>2019-10-23 17:52:22 +0000
commit3a1720af1d7f43edc5b214cde0be11bfb94d077e (patch)
tree029e0ff2d5e3c0eaf2405fd8e669555fdf5e1297 /lib/builtins/emutls.c
parent8f3cadc28cb2bb9e8f9d69eeaaea1f57f2f7b2ab (diff)
Notes
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