boost_1.36 beta on AIX 5.3 with gcc 4.2.4: Compile errors in math
Hi, Building on IBM AIX 5.3 with gcc 4.2.4 gives me the compile-time error below in math repeating itself endlessly. No such problems for boost_1.35. ...failed gcc.compile.c++ bin.v2/libs/math/build/gcc-4.2.4/release/threading-multi/cbrt.o... gcc.compile.c++ bin.v2/libs/math/build/gcc-4.2.4/release/threading-multi/copysign.o In file included from libs/math/build/../src/tr1/copysign.cpp:7: ./boost/math/tr1.hpp:438: error: 'boost::math::tr1::expm1' declared as an 'inline' variable ./boost/math/tr1.hpp:438: error: 'long double boost::math::tr1::expm1' redeclared as different kind of symbol ./boost/math/tr1.hpp:436: error: previous declaration of 'double boost::math::tr1::expm1(double)' ./boost/math/tr1.hpp:438: error: expected primary-expression before 'double' ./boost/math/tr1.hpp:438: error: expected `)' before 'double' ./boost/math/tr1.hpp:459: error: expected primary-expression before 'class' ./boost/math/tr1.hpp:460: error: 'T2' was not declared in this scope ./boost/math/tr1.hpp:460: error: '::type' has not been declared ./boost/math/tr1.hpp:467: error: expected primary-expression before 'class' ./boost/math/tr1.hpp:468: error: 'T2' was not declared in this scope ./boost/math/tr1.hpp:468: error: '::type' has not been declared ./boost/math/tr1.hpp:475: error: expected primary-expression before 'class' ./boost/math/tr1.hpp:476: error: 'T2' was not declared in this scope ./boost/math/tr1.hpp:476: error: '::type' has not been declared ./boost/math/tr1.hpp:553: error: expected primary-expression before 'class' ./boost/math/tr1.hpp:554: error: 'T2' was not declared in this scope ./boost/math/tr1.hpp:554: error: '::type' has not been declared ./boost/math/tr1.hpp:561: error: expected primary-expression before 'class' ./boost/math/tr1.hpp:562: error: 'T2' was not declared in this scope ./boost/math/tr1.hpp:562: error: '::type' has not been declared ./boost/math/tr1.hpp:611: error: expected initializer before '<' token ./boost/math/tr1.hpp:612: error: expected initializer before '<' token It seems that the compiler sees the two following functions as the same symbols, although the name slight differs: inline double expm1(double x) { return boost::math::tr1::boost_expm1(x); } inline long double expm1l(long double x) { return boost::math::tr1::boost_expm1l(x); } Renaming the second function to __expm1l makes the error disappear. The same goes for the following functions: inline double log1p(double x) { return boost::math::tr1::boost_log1p(x); } inline long double log1pl(long double x) { return boost::math::tr1::boost_log1pl(x); } And the following: inline double nextafter(double x, double y) { return boost::math::tr1::boost_nextafter(x, y); } inline long double nextafterl(long double x, long double y) { return boost::math::tr1::boost_nextafterl(x, y); } Well, there is a clear pattern. After prefixing the second function with __ makes the errors go away. Could somebody enlighten me why this is? Greets, Andrej __________________________________________________________ Not happy with your email address?. Get the one you really want - millions of new email addresses available now at Yahoo! http://uk.docs.yahoo.com/ymail/new.html
AMDG Andrej van der Zee wrote:
It seems that the compiler sees the two following functions as the same symbols, although the name slight differs:
inline double expm1(double x) { return boost::math::tr1::boost_expm1(x); } inline long double expm1l(long double x) { return boost::math::tr1::boost_expm1l(x); } <snip> Well, there is a clear pattern. After prefixing the second function with __ makes the errors go away. Could somebody enlighten me why this is?
Does it work with inline long double expm1l BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) In Christ, Steven Watanabe
participants (2)
-
Andrej van der Zee
-
Steven Watanabe