public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug c++/78209] Decltype of rvalue reference [not found] <bug-78209-4@http.gcc.gnu.org/bugzilla/> @ 2020-11-03 19:30 ` mpolacek at gcc dot gnu.org 2020-11-05 21:34 ` cvs-commit at gcc dot gnu.org ` (2 subsequent siblings) 3 siblings, 0 replies; 4+ messages in thread From: mpolacek at gcc dot gnu.org @ 2020-11-03 19:30 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78209 Marek Polacek <mpolacek at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |anders.granlund.0 at gmail dot com --- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> --- *** Bug 97363 has been marked as a duplicate of this bug. *** ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/78209] Decltype of rvalue reference [not found] <bug-78209-4@http.gcc.gnu.org/bugzilla/> 2020-11-03 19:30 ` [Bug c++/78209] Decltype of rvalue reference mpolacek at gcc dot gnu.org @ 2020-11-05 21:34 ` cvs-commit at gcc dot gnu.org 2020-11-05 21:35 ` mpolacek at gcc dot gnu.org 2021-11-24 9:46 ` pinskia at gcc dot gnu.org 3 siblings, 0 replies; 4+ messages in thread From: cvs-commit at gcc dot gnu.org @ 2020-11-05 21:34 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78209 --- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Marek Polacek <mpolacek@gcc.gnu.org>: https://gcc.gnu.org/g:e6fd02cc6d874c523466250a1cb724e0c7af9d75 commit r11-4758-ge6fd02cc6d874c523466250a1cb724e0c7af9d75 Author: Marek Polacek <polacek@redhat.com> Date: Tue Nov 3 15:10:31 2020 -0500 c++: Fix decltype(auto) deduction with rvalue ref [PR78209] Here's a small deficiency in decltype(auto). [dcl.type.auto.deduct]/5: If the placeholder-type-specifier is of the form decltype(auto), [...] the type deduced for T is determined [...] as though E had been the operand of the decltype. So: int &&i = 0; decltype(auto) j = i; // should behave like int &&j = i; error We deduce j's type in do_auto_deduction via finish_decltype_type which takes an 'id' argument. Currently we compute 'id' as false, because stripped_init is *i (a REFERENCE_REF_P). But it seems to me we should rather set 'id' to true here, by looking through the REFERENCE_REF_P, so that finish_decltype_type DTRT. gcc/cp/ChangeLog: PR c++/78209 * pt.c (do_auto_deduction): If init is REFERENCE_REF_P, use its first operand. gcc/testsuite/ChangeLog: PR c++/78209 * g++.dg/cpp1y/decltype-auto1.C: New test. ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/78209] Decltype of rvalue reference [not found] <bug-78209-4@http.gcc.gnu.org/bugzilla/> 2020-11-03 19:30 ` [Bug c++/78209] Decltype of rvalue reference mpolacek at gcc dot gnu.org 2020-11-05 21:34 ` cvs-commit at gcc dot gnu.org @ 2020-11-05 21:35 ` mpolacek at gcc dot gnu.org 2021-11-24 9:46 ` pinskia at gcc dot gnu.org 3 siblings, 0 replies; 4+ messages in thread From: mpolacek at gcc dot gnu.org @ 2020-11-05 21:35 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78209 Marek Polacek <mpolacek at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mpolacek at gcc dot gnu.org Resolution|--- |FIXED Status|NEW |RESOLVED Assignee|unassigned at gcc dot gnu.org |mpolacek at gcc dot gnu.org --- Comment #4 from Marek Polacek <mpolacek at gcc dot gnu.org> --- Fixed in GCC 11. ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/78209] Decltype of rvalue reference [not found] <bug-78209-4@http.gcc.gnu.org/bugzilla/> ` (2 preceding siblings ...) 2020-11-05 21:35 ` mpolacek at gcc dot gnu.org @ 2021-11-24 9:46 ` pinskia at gcc dot gnu.org 3 siblings, 0 replies; 4+ messages in thread From: pinskia at gcc dot gnu.org @ 2021-11-24 9:46 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78209 Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |11.0 ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-11-24 9:46 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <bug-78209-4@http.gcc.gnu.org/bugzilla/> 2020-11-03 19:30 ` [Bug c++/78209] Decltype of rvalue reference mpolacek at gcc dot gnu.org 2020-11-05 21:34 ` cvs-commit at gcc dot gnu.org 2020-11-05 21:35 ` mpolacek at gcc dot gnu.org 2021-11-24 9:46 ` 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).