[Top][All Lists]

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

Re: AC_C_LONG_DOUBLE is wrong on IRIX 5.3

From: Oliver Kiddle
Subject: Re: AC_C_LONG_DOUBLE is wrong on IRIX 5.3
Date: Fri, 16 Nov 2001 12:21:02 +0000

Paul Eggert wrote:
> > > int a[LDBL_MAX <= DBL_MAX ? -1 : 1];
> >
> > Ah, ok, thanks. Again, you should take a look that the patch is what
> > you had in mind. I assume that you didn't suggest the simpler
> >     int a = LDBL_MAX <= DBL_MAX ? -1 : 1
> > because it has some problem such as compilers doing it at runtime after
> > converting LDBL_MAX to a double or similar.
> No, the point was to have a compile-time error, not a run-time error.

I see. I didn't realise because gcc 2.95.2 was not obliging me with
an error (after swapping the condition to simulate a smaller LDBL_MAX).

The reason for this lack of error is that the definition of LDBL_MAX in
float.h is this and not something more readily recongnisable as a
#define LDBL_MAX (__extension__ ((union __convert_long_double) 
{__convert_long_double_i: {0xffffffff, 0xffffffff, 0x107ffe, 

I imagine that such definitions of LDBL_MAX are only likely to occur
where long double is supported (as it is by gcc 2.95.2) in which case
this isn't a problem. Or do you know otherwise?

> Please reword to:
> If the C compiler supports a @code{long double} type with
> greater range or precision than the @code{double} type, define

Yes, that's better.

> Can you please test and resubmit a patch along those lines?
> (In case you're worried, this process should converge eventually.  :-)

As long as you don't mind being patient.



This message has been checked for all known viruses by the 
MessageLabs Virus Scanning Service. For further information visit

reply via email to

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