From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 037623858025; Fri, 27 Nov 2020 02:14:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 037623858025 From: "eggert at cs dot ucla.edu" To: gcc-bugs@gcc.gnu.org Subject: [Bug preprocessor/98021] #warning issues redundant diagnostic lines Date: Fri, 27 Nov 2020 02:14:11 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: preprocessor X-Bugzilla-Version: 10.2.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: eggert at cs dot ucla.edu 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: 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 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: Fri, 27 Nov 2020 02:14:12 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D98021 --- Comment #2 from eggert at cs dot ucla.edu --- (In reply to Andrew Pinski from comment #1) > so you are asking not to show the source file for #warning ? That's the possibility I suggested, yes. Another possibility would be to not show the diagnostic, and just show the source file. The point is to avoid t= he duplication. > I don't see why this warning should be treated as any different from any > other warning. In other warnings, it's useful to show both the diagnostic and the source c= ode line because they're different. For '#warning "xxx"' they're the same so there's no point to showing both and there is a downside that the output is redundant and confusing.=