From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3C2613858D20; Thu, 3 Mar 2022 18:25:41 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3C2613858D20 From: "msebor at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/104746] False positive for -Wformat-overflow=2 since r12-7033-g3c9f762ad02f398c Date: Thu, 03 Mar 2022 18:25:41 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: diagnostic, lto X-Bugzilla-Severity: normal X-Bugzilla-Who: msebor at gcc dot gnu.org 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: 12.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: short_desc 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: Thu, 03 Mar 2022 18:25:41 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D104746 Martin Sebor changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|[12 Regression] False |False positive for |positive for |-Wformat-overflow=3D2 since |-Wformat-overflow=3D2 since |r12-7033-g3c9f762ad02f39= 8c |r12-7033-g3c9f762ad02f398c | --- Comment #6 from Martin Sebor --- None of these "false positives" is due to a bug in the warning code. The warning has been designed and documented to work this way. What triggers m= ore instances of these warnings in GCC 12 is the more accurate range info court= esy of Ranger. Prior to GCC 12, the ranges were less accurate and sometimes unavailable at all, and the warning is designed to avoid triggering in the absence of any range info at all. So I don't consider this a regression.=