I have a question about a code segment in SIMGEAR/simgear/compiler.h 
lines 133-147 (latest CVS version).

133 #ifdef __APPLE__
134 #  ifdef __GNUC__
135 #    if ( __GNUC__ >= 3 ) && ( __GNUC_MINOR__ >= 3 )
136 inline int (isnan)(double r) { return !(r <= 0 || r >= 0); }
137 #    else
138    // any C++ header file undefines isinf and isnan
139    // so this should be included before <iostream>
140    // the functions are STILL in libm (libSystem on mac os x)
141 extern "C" int (isnan)(double);
142 extern "C" int (isinf)(double);
143 #    endif
144 #  else
145 inline int (isnan)(double r) { return !(r <= 0 || r >= 0); }
146 #  endif
147 #endif

I am not sure what line 135 is supposed to catch. When I compile with 
g++ version 4.2 the statement is false but if I compile with g++ version 
4.3 the statement is true. Is the code supposed to catch g++ versions 
3.3 and later? If yes, the line 135 should be

#if ( (__GNUC__ >= 4 || ( __GNUC__ >= 3 ) && ( __GNUC_MINOR__ >= 3 ) )

If no, then it should be

#if ( __GNUC__ == 3 ) && ( __GNUC_MINOR__ >= 3 )


Can someone of the simgear developer team review this and commit the 
appropriate change to CVS?


Cheers,

Jari

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to