This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/77430] warn about redundant assignments


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

Eric Gallager <egallager at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2017-09-28
                 CC|                            |egallager at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #2 from Eric Gallager <egallager at gcc dot gnu.org> ---
Confirmed, the clang static analyzer catches this:

$ /sw/opt/llvm-3.1/bin/clang --analyze -Wall -Wextra -pedantic 77430.c
77430.c:3:5: warning: Value stored to 'a' is never read
    a = 0;
    ^   ~
1 warning generated.
$

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]