public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/106571] New: Implement -Wsection diag
@ 2022-08-09 11:36 bp at alien8 dot de
  2022-08-09 17:01 ` [Bug c/106571] " pinskia at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: bp at alien8 dot de @ 2022-08-09 11:36 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106571

            Bug ID: 106571
           Summary: Implement -Wsection diag
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
          Assignee: unassigned at gcc dot gnu.org
          Reporter: bp at alien8 dot de
  Target Milestone: ---

Hi,

clang has this -Wsection diag which does:

https://clang.llvm.org/docs/DiagnosticsReference.html#wsection

It would be good to have it in gcc too so that declarations like

extern u64 x86_spec_ctrl_current;

for variable definitions which belong to a specific section:

__attribute__((section(".data..percpu" ""))) __typeof__(u64)
x86_spec_ctrl_current;

get caught:

arch/x86/kernel/cpu/bugs.c:58:21: error: section attribute is specified on
redeclared variable [-Werror,-Wsection]

Thx.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-08-10 15:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-09 11:36 [Bug other/106571] New: Implement -Wsection diag 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
2022-08-10 15:11 ` bp at alien8 dot de

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).