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] New: warn about redundant assignments


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

            Bug ID: 77430
           Summary: warn about redundant assignments
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: manu at gcc dot gnu.org
  Target Milestone: ---

Simple testcase:

int foo(int a)
{
    a = 0;
    a = 0; /* missing warning */
    return a;
}

More complex cases present in GCC:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77421#c5

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