X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=tests%2Fnan.h;h=611eed3e0140e08124a489a8a83786182dcd0e56;hb=5f1cfee9e825db39e75bc2388856fb274d395e20;hp=3bdf6438c26ff363f950e78fe9f7b8090c0126af;hpb=0a56509612c0b43a3f05361ecfb73b8b39f8e66c;p=gnulib.git diff --git a/tests/nan.h b/tests/nan.h index 3bdf6438c..611eed3e0 100644 --- a/tests/nan.h +++ b/tests/nan.h @@ -1,5 +1,5 @@ /* Macros for not-a-number. - Copyright (C) 2007-2008 Free Software Foundation, Inc. + Copyright (C) 2007-2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -47,4 +47,14 @@ NaNd () /* NaNl () returns a 'long double' not-a-number. */ -#define NaNl() (0.0L / 0.0L) +/* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the + runtime type conversion. */ +#ifdef __sgi +static long double NaNl () +{ + double zero = 0.0; + return zero / zero; +} +#else +# define NaNl() (0.0L / 0.0L) +#endif