public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/98440] [9/10/11 Regression] Accepts ill-formed reinterpret_cast<int&&>(1) Date: Mon, 05 Apr 2021 21:27:31 +0000 [thread overview] Message-ID: <bug-98440-4-b0mROSvqkz@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-98440-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98440 --- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jason Merrill <jason@gcc.gnu.org>: https://gcc.gnu.org/g:07f56824fd4da14a48030e698c8eb58de951c741 commit r11-7994-g07f56824fd4da14a48030e698c8eb58de951c741 Author: Jason Merrill <jason@redhat.com> Date: Mon Apr 5 15:50:48 2021 -0400 c++: reinterpret_cast from prvalue to rvalue ref [PR98440] In r260622 I allowed this under the general principle that [basic.lval] "Whenever a prvalue appears as an operand of an operator that expects a glvalue for that operand, the temporary materialization conversion (7.3.4) is applied to convert the expression to an xvalue." But [expr.reinterpret.cast] specifically excludes creating a temporary in this case. gcc/cp/ChangeLog: PR c++/98440 * typeck.c (build_reinterpret_cast_1): Don't perform temporary materialization. gcc/testsuite/ChangeLog: * g++.dg/cpp0x/rv-cast6.C: Expect reinterpret_cast error. * g++.dg/cpp0x/reinterpret_cast2.C: Adjust message. * g++.old-deja/g++.jason/rvalue3.C: Likewise.
next prev parent reply other threads:[~2021-04-05 21:27 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-12-24 21:38 [Bug c++/98440] New: " aschepler at gmail dot com 2020-12-27 20:16 ` [Bug c++/98440] " redi at gcc dot gnu.org 2020-12-27 20:19 ` [Bug c++/98440] [9/10/11 Regression] " redi at gcc dot gnu.org 2021-01-14 11:14 ` rguenth at gcc dot gnu.org 2021-04-05 19:46 ` jason at gcc dot gnu.org 2021-04-05 21:27 ` cvs-commit at gcc dot gnu.org [this message] 2021-04-05 21:30 ` [Bug c++/98440] [9/10 " jason at gcc dot gnu.org 2021-06-01 8:19 ` rguenth at gcc dot gnu.org 2021-07-27 22:22 ` pinskia at gcc dot gnu.org 2022-05-27 9:44 ` [Bug c++/98440] [10 " rguenth at gcc dot gnu.org 2022-06-28 10:42 ` jakub at gcc dot gnu.org 2023-07-07 9:20 ` rguenth 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-98440-4-b0mROSvqkz@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).