compiling a c++ program with pgi 7.0.1

Hello all

I need “isfinite(x)” as macro or define for a c++ programs. PGI obviously does not have that. Can I simply include the gcc math.h? I think this gives a mess?

Any ideas?

Thank you

Hi,

We have filed a TPR# 14280 for isfinite support in C++. Unfortunately, there is not easy way to fix a problem for now. We do include /usr/include/math.h but we leave out the C99 part.

If you can workaround in C, we support in C.

Thank you for reporting.
Hongyon

Dear Hongyon
Thank you for the answer.
The program is part of a library. So I would be grateful for the workaround in C. A macro would possibly be even better

Best

a_bra

Hi,

You can just call isfinite in C. It should just work.

Here is example:

#include <math.h>
int checkme(float x) {
return isfinite(x);
}


Hongyon

Hi,

For pgcpp, you can use:

% pgcpp -D_ISOC99_SOURCE


Hongyon