public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "barry.revzin at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/88061] section attributes of variable templates are ignored Date: Thu, 06 Apr 2023 16:32:39 +0000 [thread overview] Message-ID: <bug-88061-4-9K8mZlGEAh@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-88061-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88061 --- Comment #6 from Barry Revzin <barry.revzin at gmail dot com> --- Any action on this one? A workaround right now is to change code that would ideally look like (which is pretty clean in my opinion): template <typename T> void foo() { [[gnu::section(".meow")]] static int value = 0; } to code that looks like: template <typename T> void foo() { static int PUT_IN_MEOW_value = 0; } and add a linker script that moves these variables over: .meow : { KEEP(*(SORT(.*PUT_IN_MEOW_*))) } But this is, to put it mildly, less than ideal.
next prev parent reply other threads:[~2023-04-06 16:32 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <bug-88061-4@http.gcc.gnu.org/bugzilla/> 2021-08-17 7:47 ` pinskia at gcc dot gnu.org 2021-08-17 7:47 ` pinskia at gcc dot gnu.org 2022-03-08 17:31 ` barry.revzin at gmail dot com 2023-04-06 16:32 ` barry.revzin at gmail dot com [this message] 2023-04-20 8:39 ` milan.svoboda at centrum dot cz 2023-04-20 9:59 ` milan.svoboda at centrum dot cz 2023-12-15 15:04 ` cvs-commit at gcc dot gnu.org 2023-12-16 17:17 ` ppalka at gcc dot gnu.org 2023-12-16 17:58 ` ppalka 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-88061-4-9K8mZlGEAh@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).