From 7f7838b36a524d8929918848302fe9276c76f86c Mon Sep 17 00:00:00 2001 From: Joao Paulo Magalhaes Date: Mon, 26 Dec 2022 14:22:59 +0000 Subject: [PATCH] Fix compile warning: implicit double->float type conversion With Intel 2021.1: ``` /home/runner/work/c4core/c4core/src/c4/ext/fast_float_all.h:319:49: error: implicit conversion between floating point types of different sizes [-Werror,-Wimplicit-float-size-conversion] constexpr static float powers_of_ten_float[] = {1e0, 1e1, 1e2, 1e3, 1e4, 1e5, ``` --- include/fast_float/float_common.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/fast_float/float_common.h b/include/fast_float/float_common.h index c2084e0..5ea8764 100644 --- a/include/fast_float/float_common.h +++ b/include/fast_float/float_common.h @@ -218,8 +218,8 @@ constexpr static int32_t invalid_am_bias = -0x8000; constexpr static double powers_of_ten_double[] = { 1e0, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13, 1e14, 1e15, 1e16, 1e17, 1e18, 1e19, 1e20, 1e21, 1e22}; -constexpr static float powers_of_ten_float[] = {1e0, 1e1, 1e2, 1e3, 1e4, 1e5, - 1e6, 1e7, 1e8, 1e9, 1e10}; +constexpr static float powers_of_ten_float[] = {1e0f, 1e1f, 1e2f, 1e3f, 1e4f, 1e5f, + 1e6f, 1e7f, 1e8f, 1e9f, 1e10f}; // used for max_mantissa_double and max_mantissa_float constexpr uint64_t constant_55555 = 5 * 5 * 5 * 5 * 5; // Largest integer value v so that (5**index * v) <= 1<<53.