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: unassig...@gcc.gnu.org ReportedBy: vincent.gram...@epfl.ch CC: r...@gcc.gnu.org, al...@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); }