Re: "cannot run C compiled programs" error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux