public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "matz at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c/106571] Implement -Wsection diag Date: Wed, 10 Aug 2022 11:57:22 +0000 [thread overview] Message-ID: <bug-106571-4-Ul1Sxs15PW@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-106571-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106571 Michael Matz <matz at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |matz at gcc dot gnu.org --- Comment #4 from Michael Matz <matz at gcc dot gnu.org> --- To elaborate: normally you don't need to know which section a variable will be placed into when generating code to access it. (In fact you don't even need to know if it's defined in the same linking component at all) So, for declarations the section is immaterial, and checking for a mismatch between decl and def doesn't seem appropriate. In the general case. This is not the general case, the per-cpu sections of the kernel have special semantics, and I agree with Andrew that checking would be better implemented with something orthogonal to the section attribute itself. Boris: what does DECLARE_PER_CPU() expand into? Are there other attributes that could be usefully checked for mismatch between decl and def?
next prev parent reply other threads:[~2022-08-10 11:57 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-08-09 11:36 [Bug other/106571] New: " bp at alien8 dot de 2022-08-09 17:01 ` [Bug c/106571] " pinskia at gcc dot gnu.org 2022-08-09 17:08 ` bp at alien8 dot de 2022-08-09 17:30 ` pinskia at gcc dot gnu.org 2022-08-10 11:57 ` matz at gcc dot gnu.org [this message] 2022-08-10 15:11 ` bp at alien8 dot de
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-106571-4-Ul1Sxs15PW@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).