Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 12 Oct 2020 11:39:47 +0200
From: Szabolcs Nagy <nsz@...t70.net>
To: Rich Felker <dalias@...c.org>
Cc: "joao@...rdrivepizza.com" <joao@...rdrivepizza.com>,
	musl@...ts.openwall.com
Subject: Re: -frounding-math breaking src/math/acosf.c

* 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

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.