Boost logo

Boost :

Subject: Re: [boost] Tests are a mess
From: Gubenko, Boris (boris.gubenko_at_[hidden])
Date: 2008-12-23 05:28:57


Emil Dotchevski wrote:
> It appears to be a bug in the compiler, [...]

Yes, it turned out to be a bug in the compiler, related to +d option (disable inlining).

x.cpp
-----
struct refcount_ptr {
  ~refcount_ptr() {}
};

struct exception {
  virtual ~exception() = 0;
  refcount_ptr data_;
};

inline exception::~exception() {}

struct S : exception {};

inline void foo( S const & ) {}

inline void bar() { foo( S() ); }

int main() {}

bash-2.03$ aCC +d x.cpp
ld: Unsatisfied symbol "refcount_ptr::~refcount_ptr()(complete)" in file x.o
1 errors.
bash-2.03$ aCC x.cpp
bash-2.03$

Thanks again for adding a workaround for this issue.

Boris

> -----Original Message-----
> From: boost-bounces_at_[hidden]
> [mailto:boost-bounces_at_[hidden]] On Behalf Of Emil Dotchevski
> Sent: Tuesday, September 09, 2008 7:53 PM
> To: boost_at_[hidden]
> Subject: Re: [boost] Tests are a mess
>
> On Tue, Sep 9, 2008 at 4:02 PM, Gubenko, Boris
> <boris.gubenko_at_[hidden]> wrote:
> > Emil,
> >
> > with the patch, get_deleter_test links cleanly and succeeds:
>
> Boris,
>
> Thanks for helping me troubleshoot this issue. Also thanks to Peter
> Dimov for suggesting the workaround.
>
> Revision 48690 should take care of it. It appears to be a bug in the
> compiler, it seems to incorrectly assume that the
> boost::exception_detail::refcount_ptr destructor is not needed if the
> destructor of the containing class, boost::exception, is pure virtual,
> which later triggers a link error.
>
> Emil Dotchevski
> Reverge Studios, Inc.
> http://www.revergestudios.com/reblog/index.php?n=ReCode
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost
>


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk