Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 26 Jun 2024 11:23:20 -0400
From: Rich Felker <dalias@...c.org>
To: enh <enh@...gle.com>
Cc: musl@...ts.openwall.com
Subject: Re: roundf() (and round(), and ...)

On Wed, Jun 26, 2024 at 06:36:09AM -0400, enh wrote:
> On Tue, Jun 25, 2024 at 7:35 PM Rich Felker <dalias@...c.org> wrote:
> >
> > On Tue, Jun 25, 2024 at 06:28:52PM -0400, enh wrote:
> > > i don't know about gcc, but iirc for clang you don't even need to do
> > > that. it assumes it knows what various functions mean, and inlines
> > > trivial stuff like this anyway...
> >
> > Not with -ffreestanding. If it does that with -ffreestanding, it's a
> > bug.
> 
> no, but my point is that most of your _users_ will never see the libm
> functions anyway. (at least not on architectures new enough that their
> fp instructions are basically "we went through <math.h> and added an
> instruction for everything that was easy", like arm64 or riscv64.)

They will if they take the address of those functions and call them
indirectly, or if they're using (still default I think; if so that
should be fixed) -fmath-errno, etc.

Inlining is an optimization; it's not by itself a conforming
implementation.

Rich

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.