Re: floating point woes on i386

RVP <[email protected]> Fri, 26 Sep 2025 15:50:57 +0000 (UTC)
Newsgroups gmane.os.netbsd.devel.userlevel
Message-ID <[email protected]>
On Thu, 25 Sep 2025, Greg Troxel wrote:

> I ran paranoia (pkgsrc/benchmarks/paranoia) on 9 and 10.  On 9:
>
>  The number of  FAILUREs  encountered =       3.
>  The number of  SERIOUS DEFECTs  discovered = 4.
>  The number of  DEFECTs  discovered =         3.
>  The number of  FLAWs  discovered =           2.
>
> which is shocking, especially as I remember earlier NetBSD i386 versions
> being ok, like 5 or 7.
>

Force strict standards compliance with `-std=c89' or `-std=c99', or pass the
`-fexcess-precision=standard' flag to the compiler.

As the gcc(1) man-page explains (see the description for `-fexcess-precision'):

 	By default, -fexcess-precision=fast is in effect; this means that
 	operations may be carried out in a wider precision than the types
 	specified in the source if that would result in faster code, and it
 	is unpredictable when rounding  to  the  types  specified  in  the
 	source code takes place.

-RVP