autoconf-patches
[Top][All Lists]
Advanced

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

Re: AC_C_LONG_DOUBLE is wrong on IRIX 5.3


From: Paul Eggert
Subject: Re: AC_C_LONG_DOUBLE is wrong on IRIX 5.3
Date: Fri, 9 Nov 2001 06:15:16 -0800 (PST)

> Date: Fri, 09 Nov 2001 11:42:06 +0000
> From: Oliver Kiddle <address@hidden>
> 
> I suspect that problems may occur in
> programs if there are any other things they assume will then work like
> any library/system calls with long double parameters or '%Lf' formats
> to printf.

That is a different issue, and it also arises in systems that have a
long double that is wider than double.  The AC_C_LONG_DOUBLE macro
isn't designed to address that issue; you'd need a different macro for
that.

> If the sizes are equal, then it isn't particularly useful for a program
> to be using long double instead of double.

That's most likely true.  I can think of possible counterexamples that
would conform to the standard, but such implementations are so
unlikely that it's not worth worrying about.

> I think it would be more useful if the check was redefined as
> `checking for a useful long double type'.

That sounds reasonable.  Can you please resubmit a patch along those lines?
You'd have to change the documentation as well, of course.

Also, the patch should compare DBL_MAX to LDBL_MAX (defined in
float.h).  This can be done at compile-time.  This will catch some of
the counterexamples that I am thinking of.  If an implementation
doesn't have float.h, DBL_MAX and LDBL_MAX, we should play it safe and
assume it doesn't have 'long double'.

The patch shouldn't check for %Lf, though.  That's a runtime check,
and should be a different macro (if it's a macro at all).



reply via email to

[Prev in Thread] Current Thread [Next in Thread]