public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/51699] New: Clang refuses to compile ext/rope citing scope resolution issues
@ 2011-12-29  6:01 fedorabugmail at yahoo dot com
  2011-12-29 10:17 ` [Bug libstdc++/51699] " paolo.carlini at oracle dot com
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: fedorabugmail at yahoo dot com @ 2011-12-29  6:01 UTC (permalink / raw)
  To: gcc-bugs

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: unassigned@gcc.gnu.org
        ReportedBy: fedorabugmail@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());


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug libstdc++/51699] Clang refuses to compile ext/rope citing scope resolution issues
  2011-12-29  6:01 [Bug libstdc++/51699] New: Clang refuses to compile ext/rope citing scope resolution issues fedorabugmail at yahoo dot com
@ 2011-12-29 10:17 ` paolo.carlini at oracle dot com
  2011-12-29 14:47 ` redi at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-12-29 10:17 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-12-29 10:15:31 UTC ---
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?


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug libstdc++/51699] Clang refuses to compile ext/rope citing scope resolution issues
  2011-12-29  6:01 [Bug libstdc++/51699] New: Clang refuses to compile ext/rope citing scope resolution issues fedorabugmail at yahoo dot com
  2011-12-29 10:17 ` [Bug libstdc++/51699] " paolo.carlini at oracle dot com
@ 2011-12-29 14:47 ` redi at gcc dot gnu.org
  2011-12-29 14:47 ` redi at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: redi at gcc dot gnu.org @ 2011-12-29 14:47 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-12-29 14:35:18 UTC ---
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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug libstdc++/51699] Clang refuses to compile ext/rope citing scope resolution issues
  2011-12-29  6:01 [Bug libstdc++/51699] New: Clang refuses to compile ext/rope citing scope resolution issues fedorabugmail at yahoo dot com
  2011-12-29 10:17 ` [Bug libstdc++/51699] " paolo.carlini at oracle dot com
  2011-12-29 14:47 ` redi at gcc dot gnu.org
@ 2011-12-29 14:47 ` redi at gcc dot gnu.org
  2011-12-29 15:08 ` paolo.carlini at oracle dot com
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: redi at gcc dot gnu.org @ 2011-12-29 14:47 UTC (permalink / raw)
  To: gcc-bugs

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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |DUPLICATE

--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-12-29 14:45:14 UTC ---
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 ***


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug libstdc++/51699] Clang refuses to compile ext/rope citing scope resolution issues
  2011-12-29  6:01 [Bug libstdc++/51699] New: Clang refuses to compile ext/rope citing scope resolution issues fedorabugmail at yahoo dot com
                   ` (2 preceding siblings ...)
  2011-12-29 14:47 ` redi at gcc dot gnu.org
@ 2011-12-29 15:08 ` paolo.carlini at oracle dot com
  2011-12-29 15:09 ` redi at gcc dot gnu.org
  2011-12-29 15:31 ` paolo.carlini at oracle dot com
  5 siblings, 0 replies; 7+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-12-29 15:08 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-12-29 14:54:18 UTC ---
Oh very well, thanks Jon, indeed now I remember that work.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug libstdc++/51699] Clang refuses to compile ext/rope citing scope resolution issues
  2011-12-29  6:01 [Bug libstdc++/51699] New: Clang refuses to compile ext/rope citing scope resolution issues fedorabugmail at yahoo dot com
                   ` (3 preceding siblings ...)
  2011-12-29 15:08 ` paolo.carlini at oracle dot com
@ 2011-12-29 15:09 ` redi at gcc dot gnu.org
  2011-12-29 15:31 ` paolo.carlini at oracle dot com
  5 siblings, 0 replies; 7+ messages in thread
From: redi at gcc dot gnu.org @ 2011-12-29 15:09 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-12-29 15:08:09 UTC ---
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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug libstdc++/51699] Clang refuses to compile ext/rope citing scope resolution issues
  2011-12-29  6:01 [Bug libstdc++/51699] New: Clang refuses to compile ext/rope citing scope resolution issues fedorabugmail at yahoo dot com
                   ` (4 preceding siblings ...)
  2011-12-29 15:09 ` redi at gcc dot gnu.org
@ 2011-12-29 15:31 ` paolo.carlini at oracle dot com
  5 siblings, 0 replies; 7+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-12-29 15:31 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-12-29 15:22:08 UTC ---
If you have the time, seems indeed a good idea.


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-12-29 15:22 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-29  6:01 [Bug libstdc++/51699] New: Clang refuses to compile ext/rope citing scope resolution issues fedorabugmail at yahoo dot com
2011-12-29 10:17 ` [Bug libstdc++/51699] " paolo.carlini at oracle dot com
2011-12-29 14:47 ` redi at gcc dot gnu.org
2011-12-29 14:47 ` redi at gcc dot gnu.org
2011-12-29 15:08 ` paolo.carlini at oracle dot com
2011-12-29 15:09 ` redi at gcc dot gnu.org
2011-12-29 15:31 ` paolo.carlini at oracle dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).