This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

_GLIBCXX_ASYNC_ABI_COMPAT and ~_Async_state_common()


Hi gcc-help,

I've just switched from gcc-4.7.1 to gcc-4.7.2 and am not getting new
warning when I link my project:

/usr/local/ots/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.7.2/../../../../x86_64-unknown-linux-gnu/bin/ld:
warning: while linking
/home/max/otsquant/build/Linux-x86_64-64.g++-debug/test/trade_scheduler_test:
symbol 'std::__future_base::_Async_state_common::~_Async_state_common()'
defined in multiple places (possible ODR violation):
  /usr/local/ots/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.7.2/../../../../include/c++/4.7.2/future:1431
from /home/max/otsquant/build/Linux-x86_64-64.g++-debug/obj-mt/trade_scheduler/optimizer.o
  ../../../../gcc-4.7.2-src/libstdc++-v3/src/c++11/compatibility-thread-c++0x.cc:89
from /usr/local/ots/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.7.2/../../../../lib64/libstdc++.so

Quick grep for "~_Async_state_common" reveals:

  class __future_base::_Async_state_common : public __future_base::_State_base
  {
  protected:
#ifdef _GLIBCXX_ASYNC_ABI_COMPAT
    ~_Async_state_common();
#else
    ~_Async_state_common() = default;
#endif

I could not find any documentation for _GLIBCXX_ASYNC_ABI_COMPAT
macro. What is it for, should I define it to avoid ODR warnings?

Maxim


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]