From: Jonathan Wakely (cow_at_[hidden])
Date: 2004-09-28 10:51:22
On Tue, Sep 28, 2004 at 03:20:13PM +0200, Guillaume Melquiond wrote:
> Le mar 28/09/2004 ? 14:18, Aleksey Gurtovoy a ?crit :
> > Guillaume Melquiond writes:
> > > Le dim 26/09/2004 ? 09:40, Aleksey Gurtovoy a ?crit :
> > > > Hmm, it looks like GCC 2.95.3/STLPort didn't get covered by the patch
> > > > -- http://tinyurl.com/6e3g5. Is this something we can fix easily?
> > >
> > > I have committed a small patch. Let's see if it fixes things. I can't be
> > > sure it will work since my version of STL is 4.6 and I don't have these
> > > problems.
> > It did! Once again, thanks everybody!
> I'm surprised it worked that well. Except for the last one, all the
> tests now pass. They shouldn't, since a deficiency with respect to name
> resolution should prevent some cmp*.cpp tests from passing (as can be
> seen with gcc-2.95.3-linux report). Martin, is the compiler really GCC
> 2.95 for the STLport tests?
> As for the last test (test_float), it seems the compiler does not find
> the abs(float) and abs(double) functions. The compilation warning shows
> only abs(int) is defined.
> I guess the problem lies in the current test code:
> #ifndef BOOST_NO_STDC_NAMESPACE
> using std::abs;
Hmm, this might be due to the fact that <math.h> on linux doesn't
include the C++-specific overloads for abs(). If STLPort's <cmath>
includes <math.h> (not a <cmath> from e.g. libstdc++) then it won't get
the abs() overloads.
libstdc++ suffers from the same problem, if you include <math.h> not
<cmath> then you don't get the C++-specific parts, only those parts that
are part of C89.
For STLPort the problem may be compounded because even <cmath> may not
add the extra overloads if all it does is forward to the system's
<math.h> (which I _think_ is the case if there's no <cmath> installed on
the system, or it's not visible to STLPort).
-- "A foolish consistency is the hobgoblin of little minds..." - Ralph Waldo Emerson
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk