https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89780
--- Comment #9 from CVS Commits ---
The trunk branch has been updated by Marek Polacek :
https://gcc.gnu.org/g:6602a2b2dee16af6e2d451c704789356042b5881
commit r13-2096-g6602a2b2dee16af6e2d451c704789356042b5881
Author: Marek Polacek
Date:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89780
--- Comment #8 from S. Davis Herring ---
I looked at P2266R3 again; it claims that the conversion function case (in #7)
is actually covered by P1825R0. I think that case is questionable, since it
still refers to "overload resolution to select
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89780
--- Comment #7 from S. Davis Herring ---
> In the withMove case, in C++20, we issue:
> warning: moving a local object in a return statement prevents copy elision
> for
> template Dest withMove();
> and:
> warning: redundant move in return
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89780
--- Comment #6 from Marek Polacek ---
The warning warns about dubious uses of std::move, so in the noMove case we
won't warn at all since there's no std::move.
In the withMove case, in C++20, we issue:
warning: moving a local object in a return
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89780
--- Comment #5 from S. Davis Herring ---
Perhaps I'm misunderstanding something, but your example (as well as compiling
the original example with -std=c++20, which produces the same warning but now
calls Dest(Dest&&) in the noMove case) means
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89780
--- Comment #4 from Marek Polacek ---
(In reply to S. Davis Herring from comment #3)
> Does this need to be language-version-dependent, given
> https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1825r0.html (in
> C++20) and
>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89780
--- Comment #3 from S. Davis Herring ---
Does this need to be language-version-dependent, given
https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1825r0.html (in
C++20) and
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89780
--- Comment #2 from Marek Polacek ---
I've posted a patch for this:
https://gcc.gnu.org/pipermail/gcc-patches/2022-August/599342.html
Sorry it's taken so long.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89780
S. Davis Herring changed:
What|Removed |Added
CC||herring at lanl dot gov
--- Comment
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89780
Marek Polacek changed:
What|Removed |Added
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed|
10 matches
Mail list logo