From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 1A670385735A; Tue, 9 Aug 2022 11:36:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1A670385735A From: "bp at alien8 dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug other/106571] New: Implement -Wsection diag Date: Tue, 09 Aug 2022 11:36:29 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: other X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: bp at alien8 dot de X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Aug 2022 11:36:30 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D106571 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.=