public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/106882] New: passing X as 'this' argument discards qualifiers
@ 2022-09-07 19:58 mpolacek at gcc dot gnu.org
  2022-09-07 19:59 ` [Bug c++/106882] " mpolacek at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2022-09-07 19:58 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106882

            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 ‘Mutt’ as ‘this’ argument
discards qualifiers [-fpermissive]

Maybe we're not checking IMPLICIT_RVALUE_P where needed.

This blocks P2266.

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

end of thread, other threads:[~2024-02-06 17:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-07 19:58 [Bug c++/106882] New: passing X as 'this' argument discards qualifiers mpolacek at gcc dot gnu.org
2022-09-07 19:59 ` [Bug c++/106882] " mpolacek at gcc dot gnu.org
2022-09-27 23:36 ` cvs-commit at gcc dot gnu.org
2022-09-27 23:39 ` mpolacek at gcc dot gnu.org
2024-02-06 17:58 ` pinskia 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).