public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "redi at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/114388] Behavioral change of typeid on xvalues since GCC 9 Date: Tue, 19 Mar 2024 11:51:51 +0000 [thread overview] Message-ID: <bug-114388-4-uKNIo2nMs2@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-114388-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114388 --- Comment #8 from Jonathan Wakely <redi at gcc dot gnu.org> --- The change makes the value category clk_rvalueref but I don't know what that means in C++98 mode: op1_lvalue_kind = lvalue_kind (TREE_OPERAND (ref, 0)); + if (op1_lvalue_kind == clk_class) + /* If E1 is an lvalue, then E1.E2 is an lvalue; + otherwise E1.E2 is an xvalue. */ + op1_lvalue_kind = clk_rvalueref; You're right that it's not a const B& but it's also not a prvalue of type B. It's some kind of reference though, as there is no longer a copy/slice that produces a B prvalue (you can add a private copy ctor and see that it's needed in GCC 8 and not in GCC 9).
next prev parent reply other threads:[~2024-03-19 11:51 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-03-19 6:27 [Bug c++/114388] New: " de34 at live dot cn 2024-03-19 6:34 ` [Bug c++/114388] " de34 at live dot cn 2024-03-19 8:00 ` rguenth at gcc dot gnu.org 2024-03-19 8:21 ` de34 at live dot cn 2024-03-19 10:54 ` redi at gcc dot gnu.org 2024-03-19 11:12 ` redi at gcc dot gnu.org 2024-03-19 11:31 ` redi at gcc dot gnu.org 2024-03-19 11:43 ` de34 at live dot cn 2024-03-19 11:51 ` redi at gcc dot gnu.org [this message] 2024-03-19 11:54 ` redi at gcc dot gnu.org 2024-04-30 6:53 ` de34 at live dot cn
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-114388-4-uKNIo2nMs2@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).