public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "enricomaria.dean6elis at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/103403] New: Decltype of rvalue reference Date: Wed, 24 Nov 2021 09:38:44 +0000 [thread overview] Message-ID: <bug-103403-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103403 Bug ID: 103403 Summary: Decltype of rvalue reference Product: gcc Version: 11.2.0 Status: UNCONFIRMED Keywords: accepts-invalid Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: enricomaria.dean6elis at gmail dot com CC: anders.granlund.0 at gmail dot com, daniel.kruegler at googlemail dot com, jason at gcc dot gnu.org, mpolacek at gcc dot gnu.org, trippels at gcc dot gnu.org, webrown.cpp at gmail dot com Target Milestone: --- Unlike the comment at the end of the original report claims, the bug seems to be still present (or at least a different shade of it). StackOverflow question: https://stackoverflow.com/questions/70092776/validity-of-presenting-an-xvalue-as-an-lvalue Repro: https://godbolt.org/z/h943G933a +++ This bug was initially created as a clone of Bug #78209 +++ This came up on the isocpp mailing list yesterday: markus@x4 /tmp % cat test.ii int main() { int &&i = 0; decltype(auto) j = i; return j; } markus@x4 /tmp % clang++ test.ii test.ii:3:18: error: rvalue reference to type 'int' cannot bind to lvalue of type 'int' decltype(auto) j = i; ^ ~ 1 error generated. markus@x4 /tmp % icpc test.ii test.ii(3): error: an rvalue reference cannot be bound to an lvalue decltype(auto) j = i; ^ compilation aborted for test.ii (code 2) markus@x4 /tmp % g++ -Wall -Wextra test.ii markus@x4 /tmp %
next reply other threads:[~2021-11-24 9:38 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-11-24 9:38 enricomaria.dean6elis at gmail dot com [this message] 2021-11-24 9:50 ` [Bug c++/103403] " pinskia at gcc dot gnu.org 2021-11-24 9:59 ` [Bug c++/103403] [11/12 Regression] auto return type with a trailing return type of decl(auto) uses rvalue reference type instead of reference type pinskia at gcc dot gnu.org 2021-11-24 10:09 ` rguenth at gcc dot gnu.org 2021-11-24 14:37 ` mpolacek at gcc dot gnu.org 2021-11-24 15:07 ` enricomaria.dean6elis at gmail dot com 2021-12-03 19:00 ` cvs-commit at gcc dot gnu.org 2021-12-03 19:01 ` [Bug c++/103403] [11 " mpolacek at gcc dot gnu.org 2022-04-21 7:50 ` rguenth at gcc dot gnu.org 2023-03-07 17:46 ` mpolacek at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-103403-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).