From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id F1FF538582BF; Fri, 23 Sep 2022 20:20:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F1FF538582BF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1663964428; bh=AGGVKBZCvSoE6u+QJeFFfldF3POpuoH/ouMBcTSFAy8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=TzSr3VKSnrqQOPoaaC+xl04nOT+HMVk4HXzNe7tY+wrIjzDK8l3WvgWPsCbMHywyi n59iDBhbjlKfB0UoWFgq5ndifZzT2jPELuddJ1/uCoQgg/q8GF1K+7EqEid7wtFtNQ QIp3NXH5DdAltvZAhVh+Sdaced8SpChrhGYdbQf8= From: "pavel.morozkin at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/51437] GCC should warn on the use of reserved identifier/macro names Date: Fri, 23 Sep 2022 20:20:28 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: unknown X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: enhancement X-Bugzilla-Who: pavel.morozkin at gmail dot com X-Bugzilla-Status: NEW 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: Message-ID: In-Reply-To: References: 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D51437 --- Comment #18 from Pavel M --- (In reply to Jonathan Wakely from comment #17) > (In reply to Josh Triplett from comment #5) > > I'd like to see this as well. While issuing such a warning by default = would > > cause numerous warnings with existing code, having it as an opt-in > > -Wreserved-identifiers would help greatly. >=20 > Clang does this now, with -Wreserved-identifier (N.B. singular, not > "identifiers") Note that in Clang -Wreserved-identifier is not part of -Wall nor -Wextra. = The reason is "chattiness of the diagnostic in practice". Full answer: https://github.com/llvm/llvm-project/issues/57913#issuecomment-1255493025.=