Hi, On 26/04/11 26/04/11 9:07 PM, "Jonathan Wakely" <jwakely.gcc@xxxxxxxxx> wrote: > On 26 April 2011 01:52, Anna Ceguerra wrote: >> >> Thanks for your reply, it successfully built in one go, and I successfully >> installed it. However when I try to compile using the new compiler, I get >> the following error: >> >> /usr/local/lib/gcc/i386-apple-darwin10.7.0/4.6.1/../../../../include/c++/4.6 >> .1/tr1/special_function_util.h: In function âÃÃbool >> std::tr1::__detail::__isnan(_Tp)âÃÃ: >> /usr/local/lib/gcc/i386-apple-darwin10.7.0/4.6.1/../../../../include/c++/4.6 >> .1/tr1/special_function_util.h:113:19: error: expected unqualified-id before >> âÃÃ(âÃà token >> >> This is the relevant section in the file: >> >> #if _GLIBCXX_USE_C99_MATH && !_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC >> >>  Â/// This is a wrapper for the isnan function. Otherwise, for NaN, >>  Â/// all comparisons result in false. If/when we build a std::isnan >>  Â/// out of intrinsics, this will disappear completely in favor of >>  Â/// std::isnan. >>  Âtemplate<typename _Tp> >>  Âinline bool __isnan(const _Tp __x) >>  Â{ >>   Âreturn std::isnan(__x);    // it is failing here >>  Â} >> >> #else >> >>  Âtemplate<typename _Tp> >>  Âinline bool __isnan(const _Tp __x) >>  Â{ >>   Âreturn __builtin_isnan(__x); >>  Â} >> >>  Âtemplate<> >>  Âinline bool __isnan<float>(const float __x) >>  Â{ >>   Âreturn __builtin_isnanf(__x); >>  Â} >> >>  Âtemplate<> >>  Âinline bool __isnan<long double>(const long double __x) >>  Â{ >>   Âreturn __builtin_isnanl(__x); >>  Â} >> >> #endif >> >> Am I configuring the program incorrectly? > > It's impossible to know because you haven't shown your program. It > might be a bug in the library, I don't think i386-darwin is a very > well tested configuration, or it could be something you've done wrong. > > Please try to reproduce the error with a minimal example to show > whether you get that error just from including a header, or only under > certain circumstances. I managed to track it down to the following test.cpp file: #include <cmath> #include <mgl/mgl.h> #include <algorithm> Where mgl is from the wxWidgets library, version 2.8.11 When I changed the order to: #include <cmath> #include <algorithm> #include <mgl/mgl.h> It worked. Thanks again for your help. Regards, Anna.