When using clang to compile an existing program, clang refuses to compile the ext/rope header files. One of the errors given is below. ropeimpl.h:433:2: error: use of undeclared identifier '_Data_allocate' _Data_allocate(_S_rounded_up_size(__old_len + __len)); g++ will compile this okay but the clang authors claim this code is invalid, http://llvm.org/bugs/show_bug.cgi?id=6454. Below are the 7 changes to the two files that allowed a successful compile. Line numbers may not be exact. In ropeimpl.h 383c381 < this->_L_deallocate(__l, 1); --- > _L_deallocate(__l, 1); 392c390 < this->_C_deallocate(__c, 1); --- > _C_deallocate(__c, 1); 400c398 < this->_F_deallocate(__f, 1); --- > _F_deallocate(__f, 1); 409c407 < this->_S_deallocate(__ss, 1); --- > _S_deallocate(__ss, 1); 433c431 < _Rope_base<_CharT, _Alloc>::_Data_allocate(_S_rounded_up_size(__old_len + __len)); --- > _Data_allocate(_S_rounded_up_size(__old_len + __len)); 514c512 < _Rope_base<_CharT, _Alloc>::_C_deallocate(__result,1); --- > _C_deallocate(__result,1); 817c815 < _Rope_base<_CharT, _Alloc>::_Data_allocate(_S_rounded_up_size(__result_len)); --- > _Data_allocate(_S_rounded_up_size(__result_len)); In rope 732c730 < this->_S_free_string(_M_data, this->_M_size,this->_M_get_allocator()); --- > __STL_FREE_STRING(_M_data, this->_M_size, this->_M_get_allocator());
Unfortunately rope is largely unmaintained. Assuming these issues are easy to handle somebody with access to clang should do the work. Note: before touching the library at all, the C++ issue should be analyzed in detail, make sure we have a Bugzilla open for it, etc, it doesn't really make sense blindly "fixing" the library for the benefit of another compiler without being able to double check what is going on with GCC. Is there a Bugzilla open for the C++ front-end issue? Otherwise, can you please open one?
I think there is a front-end bug about this, I'll try to find it. I've encountered it myself when compiling code with Clang and needed to fix code that G++ accepts in order to find names in dependent base classes
the rope code has already been fixed in trunk by Jason when he fixed the G++ lookup bug *** This bug has been marked as a duplicate of bug 24163 ***
Oh very well, thanks Jon, indeed now I remember that work.
I'm tempted to backport the library fixes, as I've been frustrated by http://bugzilla.redhat.com/show_bug.cgi?id=702256 and would like to see a working combination of clang and libstdc++ in F17
If you have the time, seems indeed a good idea.