[PATCH] conform: add ISO23 data for float.h

Adhemerval Zanella Netto adhemerval.zanella@linaro.org
Mon Nov 23 13:02:24 GMT 2026



On 21/10/26 08:31, Andreas Schwab wrote:
> 
> ---
>  conform/data/float.h-data | 28 ++++++++++++++++++++++++++++
>  1 file changed, 28 insertions(+)
> 
> diff --git a/conform/data/float.h-data b/conform/data/float.h-data
> index 350d61f452..fb20379041 100644
> --- a/conform/data/float.h-data
> +++ b/conform/data/float.h-data
> @@ -30,6 +30,12 @@ macro-constant FLT_MAX >= 1.0E37
>  macro-constant DBL_MAX >= 1.0E37
>  macro-constant LDBL_MAX >= 1.0E37
>  
> +#if defined ISO23
> +macro-constant FLT_NORM_MAX >= 1.0E37
> +macro-constant DBL_NORM_MAX >= 1.0E37
> +macro-constant LDBL_NORM_MAX >= 1.0E37
> +#endif
> +
>  macro-constant FLT_EPSILON <= 1.0E-5
>  macro-constant DBL_EPSILON <= 1.0E-9
>  macro-constant LDBL_EPSILON <= 1.0E-9
> @@ -57,6 +63,28 @@ macro-constant FLT_TRUE_MIN <= 1E-37
>  macro-constant LDBL_TRUE_MIN <= 1E-37
>  #endif
>  
> +#if defined ISO23
> +macro-int-constant FLT_IS_IEC_60559
> +macro-int-constant DBL_IS_IEC_60559
> +macro-int-constant LDBL_IS_IEC_60559
> +
> +macro-constant NAN
> +macro-constant INFINITY
> +
> +macro-constant FLT_SNAN
> +macro-constant DBL_SNAN
> +macro-constant LDBL_SNAN

These could also check the types, as math.h-data already does for NAN
and INFINITY.  This passes with GCC 14:

macro-constant NAN {float}
macro-constant INFINITY {float}

macro-constant FLT_SNAN {float}
macro-constant DBL_SNAN {double}
macro-constant LDBL_SNAN {long double}

Either way:

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>

> +
> +allow DEC32_*
> +allow DEC64_*
> +allow DEC128_*
> +
> +allow DEC_NAN
> +allow DEC_INFINITY
> +allow DEC_EVAL_METHOD
> +
> +#endif
> +
>  #if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23
>  allow *_t
>  #endif



More information about the Libc-alpha mailing list