public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/65840] New: type of result of at least some libstdc++ xmethods is different than real operator
@ 2015-04-21 22:40 dje at google dot com
2015-04-21 22:57 ` [Bug libstdc++/65840] " pinskia at gcc dot gnu.org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: dje at google dot com @ 2015-04-21 22:40 UTC (permalink / raw)
To: gcc-bugs
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.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug libstdc++/65840] type of result of at least some libstdc++ xmethods is different than real operator
2015-04-21 22:40 [Bug libstdc++/65840] New: type of result of at least some libstdc++ xmethods is different than real operator dje at google dot com
@ 2015-04-21 22:57 ` 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
2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2015-04-21 22:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65840
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Well does this matter in practice? In does set "*p = 1" work when xm is
disable and when it is enable? If the behavior is the same then it does not
matter in practice.
Or does p &*p work both with and without xmethod?
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug libstdc++/65840] type of result of at least some libstdc++ xmethods is different than real operator
2015-04-21 22:40 [Bug libstdc++/65840] New: type of result of at least some libstdc++ xmethods is different than real operator dje at google dot com
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
2 siblings, 0 replies; 4+ messages in thread
From: dje at google dot com @ 2015-04-21 23:14 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65840
--- Comment #2 from Doug Evans <dje at google dot com> ---
I think it should be more than just a matter of working in practice.
A user may get confused by the difference in the type and wonder if time needs
to be spent investigating the difference. Tools shouldn't do this to users.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug libstdc++/65840] type of result of at least some libstdc++ xmethods is different than real operator
2015-04-21 22:40 [Bug libstdc++/65840] New: type of result of at least some libstdc++ xmethods is different than real operator dje at google dot com
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
2 siblings, 0 replies; 4+ messages in thread
From: redi at gcc dot gnu.org @ 2015-04-21 23:38 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65840
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2015-04-21
Ever confirmed|0 |1
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-04-21 23:38 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-21 22:40 [Bug libstdc++/65840] New: type of result of at least some libstdc++ xmethods is different than real operator dje at google dot com
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
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).