Joseph Myers wrote:
> On Tue, 26 Jun 2018, Wilco Dijkstra wrote:

> > That looks incorrect indeed but that's mostly a problem with -fmath-errno 
> > as it
> > would result in GCC assuming the function is const/pure when in fact it 
> > isn't.
> > Does ATTR_MATHFN_FPROUNDING imply that errno is dead after the call?
>
> No, it implies a pure function, so the previous errno value is still live 
> after the call.

OK, so given GLIBC math functions may set errno anyway (irrespectively of the
math-errno setting used), those 2 settings are not sufficient. Ideally you'd 
need
to model GLIBC style errno as may or may not be set (still pure since it doesn't
affect global state but not assuming errno is live afterwards). But perhaps it
doesn't matter since this has been incorrect for years now...

Wilco


    

Reply via email to