This is the mail archive of the 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: implement __builtin_copysign

Paolo Bonzini <> writes:

| > Or, rather, an algorithm which achieves the Annex G treatment of
| > NaNs and infinities but also takes more care to avoid undue overflow
| > (an attachment to bug 18902 illustrates division with scaling to
| > avoid overflow in calculation of either numerator or denominator,
| > but without dealing with NaNs and infinities).
| I don't remember the exact details, but parts of the C99 complex-type
| specification were mathematically bogus, and very much so.  I think it
| was the handling of values where one or both values were infinities or
| NaNs.

Yes, C99 did real innovative mathematics there :-(  See past
discussions on comp.std.c on that topic.  But, that is unlikely to be
changed.  One can only advice people to be careful about that, but I
don't think we should carry the step to say that we don't want them as
crary as they might seem.

Anyway, many thanks to RTH for having provided this.

As of the functions in libgcc, we have been talking about that on
libstdc++-v3 for a long time.  I think that they should be placed in
their own name space (e.g. prefixed with say __gcc_).  The reason is
that otherwise it makes life really difficult for other language or
library implementations that have to avoid or turn around names from C
name namespace. Also, these are rally GCC's own idea of what they
functions are.

-- Gaby

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