From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E519E385DC20; Fri, 17 Apr 2020 10:09:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E519E385DC20 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1587118147; bh=1X4ia9tKjEC1CZG8Yc21fQtRbGCX6fY/0vDn5UzsteQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Mh0Qe5XDU4EzKpMG7ol7F90jDClGeoRYGfyH9lvpgNHU6TrZCh8NSTxK3f/nNz4YA o7B7O/AFdGAOCtkx54BVXdlgFyrEkhyVGc7iZtXWv5bBKyYe7EJJG5i2W9c8omBj91 SKKlTmlIgIsGtPMylj8IgGAw5MdJa0apwgwWRqEg= From: "dcb314 at hotmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug other/94629] 10 issues located by the PVS-studio static analyzer Date: Fri, 17 Apr 2020 10:09:07 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: other X-Bugzilla-Version: 10.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: dcb314 at hotmail 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: cc 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, 17 Apr 2020 10:09:08 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94629 David Binderman changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcb314 at hotmail dot com --- Comment #6 from David Binderman --- (In reply to Jakub Jelinek from comment #5) > We should for GCC11 discuss if we want to implement some of these checks, > either in -fanalyzer, or as normal GCC warnings. > E.g. the > foo =3D something; > // code that can't affect foo > foo =3D somethingelse; > is perhaps something that should be warned as early as possible after > getting into GIMPLE, before inlining because it is quite common that inli= nes > overwrite something, and in the FEs it is likely too early. A quick look at recent cppcheck output over the gcc trunk source code suggests that there are 162 cases of redundant assignment like this. Some of them might well be false positives.=