Subject: Re: [Boost-bugs] [Boost C++ Libraries] #8333: [math] PGI 11.3 problems (sph_bessel.cpp, sph_bessel.cpp)
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-04-03 11:55:50
#8333: [math] PGI 11.3 problems (sph_bessel.cpp, sph_bessel.cpp)
-------------------------------------------------+--------------------------
Reporter: Mark Dixon <m.c.dixon@â¦> | Owner: johnmaddock
Type: Bugs | Status: new
Milestone: To Be Determined | Component: math
Version: Boost 1.53.0 | Severity: Problem
Resolution: | Keywords: pgi
-------------------------------------------------+--------------------------
Comment (by Mark Dixon <m.c.dixon@â¦>):
For PGI 11.3, it seems to be in:
{{{
${PGI_HOME}/include/CC/stl/_cmath.h
}}}
Which is included by the following headers:
{{{
${PGI_HOME}/include/CC/cmath
${PGI_HOME}/include/CC/stl/_valarray.h
${PGI_HOME}/include/CC/stl/_complex.h
}}}
So it "should" be included.
Sticking the following definition:
{{{
long double abs (long double __x) { return __x; }
}}}
At the very top of sph_bessel.cpp results in the following compile error:
{{{
"/apps/compilers/pgi/11.3/1/default/linux86-64/11.3/include/CC/stl/_cmath.h",
line 208: error:
function "std::abs(long double)" conflicts with using-
declaration of
function "abs(long double)"
inline long double abs (long double __x) { return
_STLP_DO_ABS(long double)((double)__x); }
^
"./boost/math/special_functions/fpclassify.hpp", line 85: error:
using-declaration of function "abs(long double)" conflicts with
function "std::abs(long double)" (declared at line 208 of
"/apps/compilers/pgi/11.3/1/default/linux86-64/11.3/include/CC/stl/_c
math.h")
namespace std{ using ::abs; using ::fabs; }
^
2 errors detected in the compilation of
"libs/math/src/tr1/sph_bessel.cpp".
}}}
So it would appear that it is being included.
Alternatively, if I alter sph_bessel.cpp to read:
{{{
// Copyright John Maddock 2008.
// Use, modification and distribution are subject to the
// Boost Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
# include <pch.hpp>
#ifndef BOOST_MATH_TR1_SOURCE
# define BOOST_MATH_TR1_SOURCE
#endif
#include <boost/math/tr1.hpp>
#include <boost/math/special_functions/bessel.hpp>
#include "c_policy.hpp"
extern "C" double BOOST_MATH_TR1_DECL boost_sph_bessel
BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, double x)
BOOST_MATH_C99_THROW_SPEC
{
long double val = 3.14;
std::abs(val);
return c_policies::sph_bessel BOOST_PREVENT_MACRO_SUBSTITUTION(n, x);
}
}}}
I get the 3 compile errors originally reported, but no new ones.
sph_bessel.cpp clearly knows about the long double abs definition.
Presumably the problem is deep in the include files?
Thanks,
Mark
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/8333#comment:8> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:12 UTC