public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "dcb314 at hotmail dot com" <gcc-bugzilla@gcc.gnu.org>
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	[thread overview]
Message-ID: <bug-94629-4-J9y65I2PVa@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-94629-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94629

David Binderman <dcb314 at hotmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dcb314 at hotmail dot com

--- Comment #6 from David Binderman <dcb314 at hotmail dot com> ---
(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 = something;
>  // code that can't affect foo
>  foo = somethingelse;
> is perhaps something that should be warned as early as possible after
> getting into GIMPLE, before inlining because it is quite common that inlines
> 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.

  parent reply	other threads:[~2020-04-17 10:09 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-16 22:58 [Bug other/94629] New: " leo at yuriev dot ru
2020-04-17  6:32 ` [Bug other/94629] " marxin at gcc dot gnu.org
2020-04-17  7:13 ` rguenth at gcc dot gnu.org
2020-04-17  7:22 ` rguenth at gcc dot gnu.org
2020-04-17  7:25 ` rguenth at gcc dot gnu.org
2020-04-17  8:39 ` cvs-commit at gcc dot gnu.org
2020-04-17  9:14 ` jakub at gcc dot gnu.org
2020-04-17 10:09 ` dcb314 at hotmail dot com [this message]
2020-04-17 10:13 ` jakub at gcc dot gnu.org
2020-04-17 10:18 ` dcb314 at hotmail dot com
2020-04-17 10:31 ` jakub at gcc dot gnu.org
2020-04-17 11:00 ` jakub at gcc dot gnu.org
2020-04-17 12:08 ` ams at gcc dot gnu.org
2020-04-17 12:13 ` jakub at gcc dot gnu.org
2020-04-17 15:02 ` cvs-commit at gcc dot gnu.org
2020-04-17 15:10 ` dcb314 at hotmail dot com
2020-04-17 22:13 ` msebor at gcc dot gnu.org
2020-04-19 20:06 ` cvs-commit at gcc dot gnu.org
2020-04-19 20:07 ` redi at gcc dot gnu.org
2020-04-20  9:56 ` marxin at gcc dot gnu.org
2020-04-20 13:22 ` leo at yuriev dot ru
2020-04-20 19:31 ` tschwinge at gcc dot gnu.org
2020-04-21 13:17 ` cvs-commit at gcc dot gnu.org
2020-04-23 14:05 ` cvs-commit at gcc dot gnu.org
2020-04-23 14:13 ` ams at gcc dot gnu.org
2020-05-08 20:09 ` leo at yuriev dot ru
2020-05-11  7:19 ` marxin at gcc dot gnu.org
2024-01-17 21:19 ` jamborm at gcc dot gnu.org
2024-01-20 17:16 ` pinskia at gcc dot gnu.org
2024-01-20 20:27 ` dcb314 at hotmail dot com
2024-01-20 20:45 ` jamborm at gcc dot gnu.org
2024-01-21  8:12 ` dcb314 at hotmail dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-94629-4-J9y65I2PVa@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).