Re: [Boost-bugs] [Boost C++ Libraries] #8333: [math] PGI 11.3 problems (sph_bessel.cpp, sph_bessel.cpp)

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:

 Which is included by the following headers:

 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:
 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
     namespace std{ using ::abs; using ::fabs; }

 2 errors detected in the compilation of

 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
 # include <pch.hpp>
 #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
    long double val = 3.14;
    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?



Ticket URL: <>
Boost C++ Libraries <>
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