From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 411283858D28; Wed, 7 Sep 2022 19:58:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 411283858D28 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1662580738; bh=G5jt2JpREqjnnnKmH0fzb0AltyWRbFqHkA1/j798xhY=; h=From:To:Subject:Date:From; b=KES8KvKz+1CMNdSdn1w0/TvhSRzLfzxEN94ZLuodTlUnPoA+YdGsn3yp+Q5y7z4lx C8347+PDy7qRCT8yPjWOxOjxOOk2vuDhHYVUtWlH4bO7SuKaHqM9R26pwXa0uHx6rM VuU269K+RelYTWUqL26fV38dWNW8QwTb0lKHnKCY= From: "mpolacek at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/106882] New: passing X as 'this' argument discards qualifiers Date: Wed, 07 Sep 2022 19:58:57 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: mpolacek at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D106882 Bug ID: 106882 Summary: passing X as 'this' argument discards qualifiers Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: mpolacek at gcc dot gnu.org Target Milestone: --- This should be accepted: struct Mutt { operator int*() &&; }; int* five(Mutt x) { return x; // OK since C++20 because P1155 } but is currently rejected with error: passing =E2=80=98Mutt=E2=80=99 as =E2= =80=98this=E2=80=99 argument discards qualifiers [-fpermissive] Maybe we're not checking IMPLICIT_RVALUE_P where needed. This blocks P2266.=