This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/69208] New: &*this should not be const-qualified
- From: "rs2740 at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 09 Jan 2016 09:33:32 +0000
- Subject: [Bug c++/69208] New: &*this should not be const-qualified
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69208
Bug ID: 69208
Summary: &*this should not be const-qualified
Product: gcc
Version: 6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: rs2740 at gmail dot com
Target Milestone: ---
Repro:
struct A
{
void f(){ A*&& a = &*this; }
};
results in:
prog.cc: In member function 'void A::f()':
prog.cc:3:24: error: binding 'A* const' to reference of type 'A*&&' discards
qualifiers
void f(){ A*&& a = &*this; }
^~~~
PR56701 fixed the case where 'this' instead of '&*this' is used, but the above
test case still breaks.