[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: another 754R proposal to vote on



"Nelson H. F. Beebe" <beebe@xxxxxxxxxxxxx> wrote:
> 
> C99 is a BIG leap forward, but we are now 5 years and 5 months past
> its formal publication, and most Unix systems still lack
> fully-conforming C99 compilers.  On the 20+ flavors of Unix that I
> routinely build and test code on, in over 100 different C and C++
> environments, I know of only three that claim conformance: Intel icc
> on IA-32, IA-64, EM64T, and AMD64, Sun Solaris 10 c99, and
> Hewlett-Packard HP-UX 11 c99).  Recent GNU gcc is close, and even has
> a c99 program, but is in fact not there yet.  {Free,Net,Open}BSD C
> compilers do not even provide access to long double, almost 25 years
> after the Intel 8087 hit the market with hardware support for it.
> Argh...

That is a matter of opinion, and a great many people disagree.  In
particular, one of the main reasons that most vendors have stuck
with C89 is that they customers have asked them to.  There are
four reasons, which are all relevant to this mailing list:

    C99 is seriously incompatible with C89 in several important
respects.  One of the most important (size_t > long) has been used
by only one compiler.  Another (math_errhandling) was introduced
only in the FCD and has been taken up by Sun.  Note that both of
those allow implementations to break existing, maximally portable,
conforming programs without any form of diagnostic.

    C99's exception handling has fixed almost none of the areas
where it was impossible or unusable in C89 and has introduced others
(including, but not limited to, math_errhandling).  In particular,
it explicitly allows both false positives and false negatives in 
several places, and even mandates some of the latter.

    IEEE 754's exception reliability detection is already poor, but
is just possible to use reliably if both exceptional values and
exception flags are supported (i.e. not Java).  C99 supports both,
but specifies that neither need be reliable, and explicitly excludes
the most reliable mechanism (trap-diagnose-and-terminate).

    C99's support of modes is, at best, almost unusable.  7.6#2
states that it is not permitted to call ANY library function except
for the defined mathematical ones (no, not abs, exit, printf etc.)
if non-default modes are set.  There are other problems, too.


Regards,
Nick Maclaren,
University of Cambridge Computing Service,
New Museums Site, Pembroke Street, Cambridge CB2 3QH, England.
Email:  nmm1@xxxxxxxxx
Tel.:  +44 1223 334761    Fax:  +44 1223 334679


754 | revision | FAQ | references | list archive