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

             Bug #: 51699
           Summary: Clang refuses to compile ext/rope citing scope
                    resolution issues
    Classification: Unclassified
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: libstdc++
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: fedorabugm...@yahoo.com


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());

Reply via email to