This is the mail archive of the
newlib@sources.redhat.com
mailing list for the newlib project.
RE: HUGE is missing in math.h
- From: Richard Earnshaw <rearnsha at gcc dot gnu dot org>
- To: Dave Korn <dave dot korn at artimi dot com>
- Cc: tprince at computer dot org, "'Ralf Corsepius'" <ralf dot corsepius at rtems dot org>, "'Newlib List'" <newlib at sources dot redhat dot com>
- Date: Tue, 28 Jun 2005 17:43:42 +0100
- Subject: RE: HUGE is missing in math.h
- References: <SERRANOx7CTrKAf3jh700000263@SERRANO.CAM.ARTIMI.COM>
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.