From 73ad69b79092b10de34fb8780cb82550d0073b9d Mon Sep 17 00:00:00 2001 From: Roland Rabien Date: Sat, 10 Dec 2022 13:08:32 -0800 Subject: [PATCH] Roll back C features not supported in VS2017 --- ggml.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ggml.c b/ggml.c index 7c79129..24926ff 100644 --- a/ggml.c +++ b/ggml.c @@ -155,7 +155,8 @@ static inline float fp32_from_bits(uint32_t w) { union { uint32_t as_bits; float as_value; - } fp32 = { w }; + } fp32; + fp32.as_bits = w; return fp32.as_value; } @@ -163,7 +164,8 @@ static inline uint32_t fp32_to_bits(float f) { union { float as_value; uint32_t as_bits; - } fp32 = { f }; + } fp32; + fp32.as_value = f; return fp32.as_bits; }