I
istillshine
In my code I used NAN and isnan(x). I found they were convenient to
use. I also noticed that
older C standard does not support NAN and isnan(x).
When I compiled my program using:
gcc -Wall -c
it was fine.
But when I compiled my program using:
gcc -Wall -ansi -pedantic -c
it reported some errors, reporting NAN and isnan(x) not supported.
I knew the options -ansi and -pedantic make things conform to the
older C standard (C90?).
My question are:
1. Is it fine to compile my program using "gcc -Wall -c" instead of
using the more conservative "gcc -Wall -ansi -pedantic -c"?
2. Dose including NAN and isnan(x) hurt the portability of a program,
given high version of gcc is available in both Linux and Windows
(MinGW)?
use. I also noticed that
older C standard does not support NAN and isnan(x).
When I compiled my program using:
gcc -Wall -c
it was fine.
But when I compiled my program using:
gcc -Wall -ansi -pedantic -c
it reported some errors, reporting NAN and isnan(x) not supported.
I knew the options -ansi and -pedantic make things conform to the
older C standard (C90?).
My question are:
1. Is it fine to compile my program using "gcc -Wall -c" instead of
using the more conservative "gcc -Wall -ansi -pedantic -c"?
2. Dose including NAN and isnan(x) hurt the portability of a program,
given high version of gcc is available in both Linux and Windows
(MinGW)?