This is the mail archive of the newlib@sources.redhat.com mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: HUGE is missing in math.h


On Tue, 2005-06-28 at 17:01, Dave Korn wrote:
>  Hmmm.  I need some more head-scratching time on this one.  The standard
> certainly allows that, but presumably it also require the behaviour to be
> the same regardless of whether we evaluate the expression at runtime or at
> compiletime?  We may be introducing dependencies on the inner details of
> compiler behaviour if we're not careful here.

I can't put my finger on the quote off-hand, but I seem to recall
reading that the compiler is supposed to evaluate constant expressions
in the default rounding mode.  If the application doesn't change the
mode, then the results should be the same; but there's no guarantee that
this will be so if the rounding is changed.

>   Is glibc allowed to assume
> that it's being compiled by gcc / running with gcc-compiled code?

It's probably reasonable to assume that glibc will be compiled with gcc
these days.  But it's certainly unreasonable to assume that any code
linked to it will be.

R.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]