This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC 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: Why do we need to fixinclude HUGE_VAL definitions in math.h?


Nathanael Nerode <neroden@twcny.rr.com> writes:

>>>I can't figure out *why*, though.  Who's defining HUGE_VAL before math.h
>>>and wants to keep it from being trashed?
...
> So if it only triggers once (on math.h, in particular, I suspect :-)
> then it's innocuous but unnecessary.  If it triggers anywhere is, it's
> necessary.

For what it's worth, SUS2001 and C99 agree that math.h is the only
place that should define HUGE_VAL{,F,L}.

> That makes sense. :-)  There must be a reasonable way to say "bypass
> for math.h".

Well, no, we don't want to do that - if there is some other place that
defines HUGE_VAL, and it's put first, and it disagrees with math.h,
the user will get errors.

It might make sense instead to have the fix delete any definition of
HUGE_VAL that's *not* in math.h, but that might cause other problems.

zw


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