@@ -357,8 +357,8 @@ uint64_t float2ufix64(float f, int e);
357357// or call the original function
358358#if PICO_FLOAT_HAS_FIX32_TO_FLOAT_CONVERSIONS
359359// a bit of a hack to inline VFP fixed-point conversion when exponent is constant and in range 1-32
360- #define fix2float (m , e ) __builtin_choose_expr (__builtin_constant_p(e), (e) >= 1 && (e) <= 32 ? _fix2float_inline(m, e) : fix2 ## float(m, e), fix2 ## float(m, e))
361- #define ufix2float (m , e ) __builtin_choose_expr (__builtin_constant_p(e), (e) >= 1 && (e) <= 32 ? _ufix2float_inline(m, e) : ufix2 ## float(m, e), ufix2 ## float(m, e))
360+ #define fix2float (m , e ) (__builtin_constant_p(e) && (e) >= 1 && (e) <= 32 ? _fix2float_inline(m, e) : fix2 ## float(m, e))
361+ #define ufix2float (m , e ) (__builtin_constant_p(e) && (e) >= 1 && (e) <= 32 ? _ufix2float_inline(m, e) : ufix2 ## float(m, e))
362362
363363#define _fix2float_inline (m , e ) ({ \
364364 int32_t _m = m; \
@@ -385,8 +385,8 @@ uint64_t float2ufix64(float f, int e);
385385
386386#endif
387387#if PICO_FLOAT_HAS_FLOAT_TO_FIX32_Z_CONVERSIONS
388- #define float2fix_z (f , e ) __builtin_choose_expr (__builtin_constant_p(e), (e) >= 1 && (e) <= 32 ? _float2fix_z_inline(f, e) : float2 ## fix_z(f, e), float2 ## fix_z(f, e))
389- #define float2ufix_z (f , e ) __builtin_choose_expr (__builtin_constant_p(e), (e) >= 1 && (e) <= 32 ? _float2ufix_z_inline(f, e) : float2 ## ufix_z(f, e), float2 ## ufix_z(f, e))
388+ #define float2fix_z (f , e ) (__builtin_constant_p(e) && (e) >= 1 && (e) <= 32 ? _float2fix_z_inline(f, e) : float2 ## fix_z(f, e))
389+ #define float2ufix_z (f , e ) (__builtin_constant_p(e) && (e) >= 1 && (e) <= 32 ? _float2ufix_z_inline(f, e) : float2 ## ufix_z(f, e))
390390
391391#define _float2fix_z_inline (f , e ) ({ \
392392 int32_t _m; \
@@ -413,8 +413,8 @@ uint64_t float2ufix64(float f, int e);
413413
414414#endif
415415#if PICO_FLOAT_HAS_FLOAT_TO_FIX32_M_CONVERSIONS
416- #define float2fix (f , e ) __builtin_choose_expr (__builtin_constant_p(e), (e) >= 1 && (e) <= 32 ? _float2fix_inline(f, e) : float2 ## fix(f, e), float2 ## fix(f, e))
417- #define float2ufix (f , e ) __builtin_choose_expr (__builtin_constant_p(e), (e) >= 1 && (e) <= 32 ? _float2ufix_inline(f, e) : float2 ## ufix(f, e), float2 ## ufix(f, e))
416+ #define float2fix (f , e ) (__builtin_constant_p(e) && (e) >= 1 && (e) <= 32 ? _float2fix_inline(f, e) : float2 ## fix(f, e))
417+ #define float2ufix (f , e ) (__builtin_constant_p(e) && (e) >= 1 && (e) <= 32 ? _float2ufix_inline(f, e) : float2 ## ufix(f, e))
418418
419419#define _float2fix_inline (f , e ) ({ \
420420 union { float _f; int32_t _i; } _u; \
0 commit comments