[Bug c++/45940] New: [trans-mem] Error of unsafe function even if annotated

vincent.gramoli at epfl dot ch gcc-bugzilla@gcc.gnu.org
Fri Oct 8 12:51:00 GMT 2010


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

           Summary: [trans-mem] Error of unsafe function even if annotated
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: vincent.gramoli@epfl.ch
                CC: rth@gcc.gnu.org, aldyh@gcc.gnu.org


When I compile a transactional program which use an annotated STL, GCC
compilation says that the function is not safe even if it is annotated.

I have attached the ii file (I tried to make it smaller but it didn't
figure out when it happens).

Here the compilation:
$ g++ -O0 -c -Wall -g -fgnu-tm -fno-builtin Building.ii
In file included from src/Building.cpp:77:0:
src/Building.cpp:1341:27: error: unsafe function call ‘void
std::list<_Tp, _Alloc>::push_front(const value_type&) [with _Tp =
Bullet*, _Alloc = std::allocator<Bullet*>, value_type = Bullet*]’ within
‘transaction_safe’ function

Extract from STL source:
__attribute__((transaction_pure))
       void
       push_front(const value_type& __x)
       { this->_M_insert(begin(), __x); }



More information about the Gcc-bugs mailing list