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 libstdc++/104602] std::source_location::current uses cast from void* Date: Thu, 07 Jul 2022 23:31:59 +0000 [thread overview] Message-ID: <bug-104602-4-S0gL1I2zTt@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-104602-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104602 --- Comment #10 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-11 branch has been updated by Jonathan Wakely <redi@gcc.gnu.org>: https://gcc.gnu.org/g:ed377f0fb3419fceed25ae378aca2efca1a6b79d commit r11-10115-ged377f0fb3419fceed25ae378aca2efca1a6b79d Author: Jonathan Wakely <jwakely@redhat.com> Date: Thu Feb 24 21:33:44 2022 +0000 libstdc++: Fix cast in source_location::current() [PR104602] This fixes a problem for Clang, which is going to return a non-void pointer from __builtin_source_location(). The current definition of std::source_location::current() converts that to void* and then has to cast it back again in the body (which makes it invalid in a constant expression). By using the actual type of the returned pointer, we avoid the problematic cast for Clang. libstdc++-v3/ChangeLog: PR libstdc++/104602 * include/std/source_location (source_location::current): Use deduced type of __builtin_source_location(). (cherry picked from commit 41cbcf53dc60b7434b9ee059b3a734a47f5bf212)
next prev parent reply other threads:[~2022-07-07 23:31 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-02-19 3:31 [Bug libstdc++/104602] New: " foom at fuhm dot net 2022-02-19 3:50 ` [Bug libstdc++/104602] " pinskia at gcc dot gnu.org 2022-02-19 12:06 ` redi at gcc dot gnu.org 2022-02-19 12:56 ` jakub at gcc dot gnu.org 2022-02-21 14:58 ` foom at fuhm dot net 2022-02-21 15:05 ` jakub at gcc dot gnu.org 2022-02-21 21:06 ` redi at gcc dot gnu.org 2022-02-24 23:46 ` cvs-commit at gcc dot gnu.org 2022-02-24 23:47 ` redi at gcc dot gnu.org 2022-02-24 23:48 ` redi at gcc dot gnu.org 2022-07-07 23:31 ` cvs-commit at gcc dot gnu.org [this message] 2022-07-07 23:33 ` redi 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-104602-4-S0gL1I2zTt@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).