public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "dje at google dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/65840] New: type of result of at least some libstdc++ xmethods is different than real operator Date: Tue, 21 Apr 2015 22:40:00 -0000 [thread overview] Message-ID: <bug-65840-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65840 Bug ID: 65840 Summary: type of result of at least some libstdc++ xmethods is different than real operator Product: gcc Version: 4.9.1 Status: UNCONFIRMED Severity: minor Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: dje at google dot com Using libstdc++-v3/testsuite/libstdc++-xmethods/unique_ptr.cc as a testcase, and modifying it to ensure the * operator is compiled in: --- gcc-unique_ptr.cc.~1~ 2015-04-21 15:17:37.863001716 -0700 +++ gcc-unique_ptr.cc 2015-04-21 15:18:14.666458223 -0700 @@ -30,7 +30,7 @@ main () // { dg-final { note-test *p 10 } } // { dg-final { regexp-test p.get() 0x.* } } - return 0; // Mark SPOT + return *p; // Mark SPOT } // { dg-final { gdb-test SPOT {} 1 } } bash$ gdb a.out (gdb) start (gdb) n # keep next'ing until we get here: 33 return *p; // Mark SPOT (gdb) p *p $1 = 10 (gdb) disable xm (gdb) p *p $2 = (int &) @0x403010: 10 (gdb) pt $1 type = int (gdb) pt $2 type = int & Note the difference in type of the result of the xmethod vs the real * operator. IWBN if they had the same type. If this requires additions to gdb we can do that.
next reply other threads:[~2015-04-21 22:40 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-04-21 22:40 dje at google dot com [this message] 2015-04-21 22:57 ` [Bug libstdc++/65840] " pinskia at gcc dot gnu.org 2015-04-21 23:14 ` dje at google dot com 2015-04-21 23:38 ` redi at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-65840-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).