public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/16043] New: missing C++11 move constructor
@ 2013-10-12  7:45 jan.kratochvil at redhat dot com
  2013-10-12  8:30 ` [Bug c++/16043] " jan.kratochvil at redhat dot com
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: jan.kratochvil at redhat dot com @ 2013-10-12  7:45 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=16043

            Bug ID: 16043
           Summary: missing C++11 move constructor
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: c++
          Assignee: unassigned at sourceware dot org
          Reporter: jan.kratochvil at redhat dot com

Created attachment 7230
  --> https://sourceware.org/bugzilla/attachment.cgi?id=7230&action=edit
DW_TAG_rvalue_reference_type like DW_TAG_reference_type

#include <memory>
class C {
public:
  C() {}
  C(C &&o);
  int i=42;
};
C::C(C &&o) {
  i=o.i; /* line 9 */
}
int main() {
  C a;
  C b(std::move(a));
}


(1)
DW_TAG_rvalue_reference_type is not recognized:
(gdb) b 9
(gdb) run
(gdb) p o
$3 = <unknown type in /home/jkratoch/t/test7, CU 0x0, DIE 0x1f7b>
with attached patch:
(gdb) p o
$1 = (C &) @0x7fffffffd960: {i = 42}


(2)
'&&' operator is not parsed/evaluated:
(gdb) start
(gdb) next
(gdb) p &a
$1 = (C *) 0x7fffffffd960
(gdb) p (struct C &)a
$2 = (C &) @0x7fffffffd960: {i = 42}
(gdb) p (struct C &&)a
A syntax error in expression, near `&&)a'.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


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

* [Bug c++/16043] missing C++11 move constructor
  2013-10-12  7:45 [Bug c++/16043] New: missing C++11 move constructor jan.kratochvil at redhat dot com
@ 2013-10-12  8:30 ` jan.kratochvil at redhat dot com
  2013-10-12  8:31 ` jan.kratochvil at redhat dot com
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: jan.kratochvil at redhat dot com @ 2013-10-12  8:30 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=16043

Jan Kratochvil <jan.kratochvil at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jan.kratochvil at redhat dot com

--- Comment #1 from Jan Kratochvil <jan.kratochvil at redhat dot com> ---
Created attachment 7231
  --> https://sourceware.org/bugzilla/attachment.cgi?id=7231&action=edit
fix+testcase, just that it displays &

This fix+testcase would work, just that it displays:
$1 = (C &) @0x7fffffffd960: {i = 42}
while I think it should display:
$1 = (C &&) @0x7fffffffd960: {i = 42}

This means to either add TYPE_CODE_RVALUE_REF besides TYPE_CODE_REF which is
pretty tedious - referenced in 155 LoCs - due to missing types virtualization.

Or to add new main_type::flag_ref_is_rvalue but that is not too clean.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


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

* [Bug c++/16043] missing C++11 move constructor
  2013-10-12  7:45 [Bug c++/16043] New: missing C++11 move constructor jan.kratochvil at redhat dot com
  2013-10-12  8:30 ` [Bug c++/16043] " jan.kratochvil at redhat dot com
@ 2013-10-12  8:31 ` jan.kratochvil at redhat dot com
  2013-10-12 15:29 ` jan.kratochvil at redhat dot com
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: jan.kratochvil at redhat dot com @ 2013-10-12  8:31 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=16043

Jan Kratochvil <jan.kratochvil at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Attachment #7230|0                           |1
        is obsolete|                            |

-- 
You are receiving this mail because:
You are on the CC list for the bug.


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

* [Bug c++/16043] missing C++11 move constructor
  2013-10-12  7:45 [Bug c++/16043] New: missing C++11 move constructor jan.kratochvil at redhat dot com
                   ` (2 preceding siblings ...)
  2013-10-12 15:29 ` jan.kratochvil at redhat dot com
@ 2013-10-12 15:29 ` jan.kratochvil at redhat dot com
  2013-10-14 16:30 ` jan.kratochvil at redhat dot com
  4 siblings, 0 replies; 6+ messages in thread
From: jan.kratochvil at redhat dot com @ 2013-10-12 15:29 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=16043

Jan Kratochvil <jan.kratochvil at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at sourceware dot org   |jan.kratochvil at redhat dot com

--- Comment #2 from Jan Kratochvil <jan.kratochvil at redhat dot com> ---
[patch] Support C++11 rvalue (move constructor)
https://sourceware.org/ml/gdb-patches/2013-10/msg00403.html

-- 
You are receiving this mail because:
You are on the CC list for the bug.


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

* [Bug c++/16043] missing C++11 move constructor
  2013-10-12  7:45 [Bug c++/16043] New: missing C++11 move constructor jan.kratochvil at redhat dot com
  2013-10-12  8:30 ` [Bug c++/16043] " jan.kratochvil at redhat dot com
  2013-10-12  8:31 ` jan.kratochvil at redhat dot com
@ 2013-10-12 15:29 ` jan.kratochvil at redhat dot com
  2013-10-12 15:29 ` jan.kratochvil at redhat dot com
  2013-10-14 16:30 ` jan.kratochvil at redhat dot com
  4 siblings, 0 replies; 6+ messages in thread
From: jan.kratochvil at redhat dot com @ 2013-10-12 15:29 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=16043

Jan Kratochvil <jan.kratochvil at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Attachment #7231|0                           |1
        is obsolete|                            |

-- 
You are receiving this mail because:
You are on the CC list for the bug.


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

* [Bug c++/16043] missing C++11 move constructor
  2013-10-12  7:45 [Bug c++/16043] New: missing C++11 move constructor jan.kratochvil at redhat dot com
                   ` (3 preceding siblings ...)
  2013-10-12 15:29 ` jan.kratochvil at redhat dot com
@ 2013-10-14 16:30 ` jan.kratochvil at redhat dot com
  4 siblings, 0 replies; 6+ messages in thread
From: jan.kratochvil at redhat dot com @ 2013-10-14 16:30 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=16043

Jan Kratochvil <jan.kratochvil at redhat dot com> changed:

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

--- Comment #3 from Jan Kratochvil <jan.kratochvil at redhat dot com> ---
duplicate

*** This bug has been marked as a duplicate of bug 14441 ***

-- 
You are receiving this mail because:
You are on the CC list for the bug.


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

end of thread, other threads:[~2013-10-14 16:30 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-12  7:45 [Bug c++/16043] New: missing C++11 move constructor jan.kratochvil at redhat dot com
2013-10-12  8:30 ` [Bug c++/16043] " jan.kratochvil at redhat dot com
2013-10-12  8:31 ` jan.kratochvil at redhat dot com
2013-10-12 15:29 ` jan.kratochvil at redhat dot com
2013-10-12 15:29 ` jan.kratochvil at redhat dot com
2013-10-14 16:30 ` jan.kratochvil at redhat 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).