mailing list of musl libc
 help / color / mirror / Atom feed
* [musl] -frounding-math breaking src/math/acosf.c
@ 2020-10-09 22:16 joao
  2020-10-09 23:10 ` Rich Felker
  0 siblings, 1 reply; 4+ messages in thread
From: joao @ 2020-10-09 22:16 UTC (permalink / raw)
  To: musl

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.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [musl] -frounding-math breaking src/math/acosf.c
  2020-10-09 22:16 [musl] -frounding-math breaking src/math/acosf.c joao
@ 2020-10-09 23:10 ` Rich Felker
  2020-10-09 23:15   ` joao
  2020-10-12  9:39   ` Szabolcs Nagy
  0 siblings, 2 replies; 4+ messages in thread
From: Rich Felker @ 2020-10-09 23:10 UTC (permalink / raw)
  To: joao; +Cc: musl

On Sat, Oct 10, 2020 at 12:16:13AM +0200, joao@overdrivepizza.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.

Rich

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [musl] -frounding-math breaking  src/math/acosf.c
  2020-10-09 23:10 ` Rich Felker
@ 2020-10-09 23:15   ` joao
  2020-10-12  9:39   ` Szabolcs Nagy
  1 sibling, 0 replies; 4+ messages in thread
From: joao @ 2020-10-09 23:15 UTC (permalink / raw)
  To: Rich Felker; +Cc: musl

> 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.

Makes sense, I'll submit/report it.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [musl] -frounding-math breaking src/math/acosf.c
  2020-10-09 23:10 ` Rich Felker
  2020-10-09 23:15   ` joao
@ 2020-10-12  9:39   ` Szabolcs Nagy
  1 sibling, 0 replies; 4+ messages in thread
From: Szabolcs Nagy @ 2020-10-12  9:39 UTC (permalink / raw)
  To: Rich Felker; +Cc: joao, musl

* Rich Felker <dalias@libc.org> [2020-10-09 19:10:00 -0400]:

> On Sat, Oct 10, 2020 at 12:16:13AM +0200, joao@overdrivepizza.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).

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-10-12  9:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-09 22:16 [musl] -frounding-math breaking src/math/acosf.c joao
2020-10-09 23:10 ` Rich Felker
2020-10-09 23:15   ` joao
2020-10-12  9:39   ` Szabolcs Nagy

mailing list of musl libc

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.vuxu.org/musl

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 musl musl/ http://inbox.vuxu.org/musl \
		musl@inbox.vuxu.org
	public-inbox-index musl

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.musl


code repositories for the project(s) associated with this inbox:

	https://git.vuxu.org/mirror/musl/

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git