This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: isinf


On Jul 13, 2005, at 4:29 PM, Joe Buck wrote:
On Thu, Jul 14, 2005 at 08:16:07AM +0900, Hiroshi Fujishima wrote:
Eric Botcazou <ebotcazou@libertysurf.fr> writes:

The configure script which is included in rrdtool[1] checks whether
the system has isinf() as below.

#include <math.h>
int
main ()
{
float f = 0.0; isinf(f)
  ;
  return 0;
}

The test is clearly fragile. Assigning the return value of isinf to a
variable should be sufficient for 4.0.x at -O0.

Yes, I contact rrdtool maintainer. Thank you.

Best to make it a global variable, to guard against dead code elimination.

Volatile would be even better. It's valid to eliminate stores into globals
if you can determine the value isn't used thereafter, which we can here,
at least theoretically.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]