Re: [Flightgear-devel] Question regarding pre-processor code in SIMGEAR/simgear/compiler.h

2009-10-31 Thread Erik Hofman
Jari Häkkinen wrote:
 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 ) )

Ok, I've fixed it slightly different but it's committed.

Erik


--
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


Re: [Flightgear-devel] Question regarding pre-processor code in SIMGEAR/simgear/compiler.h

2009-10-31 Thread James Turner

On 31 Oct 2009, at 08:48, Erik Hofman wrote:

 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 ) )

 Ok, I've fixed it slightly different but it's committed.

I looked at this block and more or less despaired.

My preferred solution would be to use osg::isNan (or some other  
wrapper) and delegate all this pain and #ifdef work to someone else

Regards,
James


--
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


Re: [Flightgear-devel] Question regarding pre-processor code in SIMGEAR/simgear/compiler.h

2009-10-31 Thread Erik Hofman
James Turner wrote:
 On 31 Oct 2009, at 08:48, Erik Hofman wrote:
 
 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 ) )
 Ok, I've fixed it slightly different but it's committed.
 
 I looked at this block and more or less despaired.
 
 My preferred solution would be to use osg::isNan (or some other  
 wrapper) and delegate all this pain and #ifdef work to someone else

Which would mean that every single bit of code in FlightGear will depend 
on osg..

Erik

--
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


Re: [Flightgear-devel] Question regarding pre-processor code in SIMGEAR/simgear/compiler.h

2009-10-31 Thread James Turner

On 31 Oct 2009, at 12:27, Erik Hofman wrote:

 Which would mean that every single bit of code in FlightGear will  
 depend
 on osg..

Which is why I didn't commit that approach.

I do wonder on the need to be supporting GCC versions earlier than  
4.0, though.

James


--
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


[Flightgear-devel] Question regarding pre-processor code in SIMGEAR/simgear/compiler.h

2009-10-30 Thread Jari Häkkinen
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