http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49445

           Summary: Undefined reference to std::atomic<float> "operator
                    float"
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: libstdc++
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: raskolni...@gnu.org


Hello,

It looks like std::atomic<float> does is not fully implemented. I get an
undefined reference to its operator float:

libtool: link: g++ -Wall -I/usr/include -I../../src -I../../src -g -O2
-std=c++0x -DNDEBUG -o .libs/psynth_unit_test
psynth_unit_test-psynth_unit_test.o [... a big list of object files ...]
-L/usr/lib64 -lboost_unit_test_framework-mt -lboost_filesystem-mt
-lboost_signals-mt -lboost_system-mt ../psynth/.libs/libpsynth.so -Wl,-rpath
-Wl,/home/raskolnikov/usr/lib

../psynth/.libs/libpsynth.so: undefined reference to 
   `atomic<float>::operator float() const'

A similar bug happened when I tried std::atomic<my_enum> with "my_enum" being a
"enum class my_enum : int", I got an undefined reference to the "store ()"
method instead.

I am using GCC 4.6 as included in Debian Sid:

  g++ --version
  g++ (Debian 4.6.0-13) 4.6.1 20110611 (prerelease)

  apt-cache show libstdc++6-4.6-dev
  Package: libstdc++6-4.6-dev
  Source: gcc-4.6
  Version: 4.6.0-13

Anyways, thanks a lot for your hard work implementing C++11 :)

JP

Reply via email to