From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2BC58385840D; Tue, 30 Jan 2024 11:25:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2BC58385840D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1706613951; bh=IIy177Ja4Gi9bf6U+YyjcNq+Qa5Q5htYYmdcgqxpD8o=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Pt8pp17eW0vvT6JDHcM/eJlJlXYum4tTp6uuflBHtN2gfGg5A7NN6RigmaLkUNDzi pOfcnKC75kkq4N4IVz+a2WNI9vIDJFr/WCW8MPMAA5vT7KJPQDGgPJXdQR7xhGTQek kQDoE7eByUkrsw5ZJ0DdUoK8sb6kpUfbT0/SzGA8= From: "stefan at bytereef dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/113664] False positive warnings with -fno-strict-overflow (-Warray-bounds, -Wstringop-overflow) Date: Tue, 30 Jan 2024 11:25:50 +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: 14.0 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: stefan at bytereef dot 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: --- 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=3D113664 --- Comment #6 from Stefan Krah --- Sometimes you hear "code should be rewritten" because squashing the warnings makes it better. I disagree. I've seen many segfaults introduced in projects that rush to squash warnings. Sometimes, analyzers just cannot cope with established idioms. clang-analyz= er for instance hates Knuth's algorithm D (long division). It would be strange= to change that for an analyzer.=