Re: Broken isnan(3) and/or DQNAN on Tru64

2009-05-10 Thread Ludovic Courtès
l...@gnu.org (Ludovic Courtès) writes: > Or maybe that's a Debian patch that enables `-mieee' by default? Actually yes, there's `debian/patches/alpha-ieee.dpatch', which is why I didn't observe SIGFPEs on Debian GNU/Linux. Ludo'.

Re: Broken isnan(3) and/or DQNAN on Tru64

2009-05-03 Thread Bruno Haible
Ludovic Courtès wrote: > on alpha*-linux-gnu, `-mieee' is apparently not needed: > > --8<---cut here---start->8--- > #include > > int > main (int argc, char *argv[]) > { > return isnan (NAN); > } > --8<---cut here---end---

Re: Broken isnan(3) and/or DQNAN on Tru64

2009-05-03 Thread Ludovic Courtès
Hi, Bruno Haible writes: >> So people compiling with GCC on this platform should pass `-mieee' >> (`configure' could add it automatically.) > > The gnulib module 'fpieee' adds it automatically. This module appears to be overzealous: `gl_FP_IEEE' just checks for the host CPU, but on alpha*-linux

Re: Broken isnan(3) and/or DQNAN on Tru64

2009-05-02 Thread Bruno Haible
Ludovic Courtès wrote: > >> Should we conclude that this is a GCC bug? > > > > Possibly. And what result do you get with "gcc -mieee" ? > > It works (returns 1). > > The GCC manual (info "(gcc) DEC Alpha Options") reads this: > > `-mieee' > > [...] > This option generates code fully I

Re: Broken isnan(3) and/or DQNAN on Tru64

2009-05-02 Thread Ludovic Courtès
Hello, Bruno Haible writes: > I meant %08X instead of %04X. DQNAN therefore likely is > FFF8 > which decomposes into > sign = 1 (irrelevant for NaNs), > exponent = 0x7FF (highest possible value) > mantissa = 0x8 > and this is precisely the common encoding of a qui

Re: Broken isnan(3) and/or DQNAN on Tru64

2009-05-02 Thread Bruno Haible
Ludovic Courtès wrote: > > And finally, what's the hexdump of that DQNAN constant? > > > > #include > > #include > > int main() > > { > > printf("%04X%04X\n", DQNAN[1], DQNAN[0]); > > return 0; > > } > > FFF8 I meant %08X instead of %04X. DQNAN therefore likely is FF

Re: Broken isnan(3) and/or DQNAN on Tru64

2009-05-02 Thread Ludovic Courtès
Hi Bruno, Bruno Haible writes: > What's the result when you compile it with cc? > $ cc foo.c -lm > $ ./a.out > $ echo $? 1 That's with "Compaq C V6.5-303 (dtk) on Compaq Tru64 UNIX V5.1B (Rev. 2650)". Should we conclude that this is a GCC bug? I'll try with different versions. > What'

Re: Broken isnan(3) and/or DQNAN on Tru64

2009-05-01 Thread Bruno Haible
Ludovic Courtès wrote: > On `alphaev56-dec-osf5.1b', NaN handling seems to be deeply broken. > Consider this piece of code: > > --8<---cut here---start->8--- > #include > > extern unsigned int DQNAN[2]; > > int > main (int argc, char *argv[]) > { > return i