From c5e1967ddb7e8c4f195328c991a1554e9ffda70b Mon Sep 17 00:00:00 2001 From: mayeut Date: Sun, 23 Nov 2025 09:38:19 +0100 Subject: [PATCH] fix(warning): taking the absolute value of 'bfloat16' has no effect The compinv function is invalid when building for BFLOAT16 and leads to the following warning: `taking the absolute value of unsigned type 'bfloat16' (aka 'unsigned short') has no effect`. Update pre-processor conditions to remove its definition when building for BFLOAT16. --- common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common.h b/common.h index 4984d727cd..512096ca1d 100644 --- a/common.h +++ b/common.h @@ -781,7 +781,7 @@ static __inline int readenv_atoi(char *env) { #endif #endif -#if !defined(XDOUBLE) || !defined(QUAD_PRECISION) +#if !defined(BFLOAT16) && (!defined(XDOUBLE) || !defined(QUAD_PRECISION)) static __inline void compinv(FLOAT *b, FLOAT ar, FLOAT ai){