Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID:
 <MWHPR1201MB0110FBBA1B89F0C2320E2B0CCBC30@MWHPR1201MB0110.namprd12.prod.outlook.com>
Date: Fri, 18 Dec 2020 09:13:10 -0800
From: Fangrui Song <i@...kray.me>
To: musl@...ts.openwall.com, Rich Felker <dalias@...c.org>, 
	"joao@...rdrivepizza.com" <joao@...rdrivepizza.com>
Subject: Re: -frounding-math breaking src/math/acosf.c

On Mon, Oct 12, 2020 at 2:40 AM Szabolcs Nagy <nsz@...t70.net> wrote:
>
> * Rich Felker <dalias@...c.org> [2020-10-09 19:10:00 -0400]:
>
> > On Sat, Oct 10, 2020 at 12:16:13AM +0200, joao@...rdrivepizza.com wrote:
> > > Hi,
> > >
> > > I just noticed that the upstream LLVM is no longer capable of
> > > compiling musl 1.2.0 (and possibly more recent versions too) when
> > > -frounding-math is in use. I bisected the LLVM commit to
> > > https://reviews.llvm.org/D87822, and pointed the problem there.
> > >
> > > Just reporting in case someone else also has issues with this.
> > >
> > > Best,
> > > Joao.
> >
> > Thanks. This probably needs to be reported as aa bug against LLVM (or
> > clang?) rather than just a comment on the review so that it's tracked
> > as such. It seems they've erroneously made it treat static
> > initializers as non-constant-expressions rather than evaluating them
> > statically in the default rounding mode per the spec.
>
> const expressions should work as described in
>
> http://port70.net/~nsz/c/c11/n1570.html#F.8.4

clang main has fixed (https://reviews.llvm.org/D89360) the regression
of https://reviews.llvm.org/D87822

> but it seems clang handles literals that don't
> need conversion:
>
> float x = 0.1f; // works
> float y = 0.1; // fails
>
> we may want to fix this anyway in musl to always
> use the right type of literal (then it's clear
> that there is no double rounding).

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.