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

            Bug ID: 85617
           Summary: Wunused-but-set-variable does not analyze variables
                    passed to functions
           Product: gcc
           Version: 8.1.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: ipa
          Assignee: unassigned at gcc dot gnu.org
          Reporter: danielgutson at gmail dot com
                CC: marxin at gcc dot gnu.org
  Target Milestone: ---

The following code

void f(int& x)
{
    x = 1;
}

int main()
{
    int a;
    f(a);
    //a = 1;
}

should warn about 'a' assigned but never used in main. Shouldn't be this helped
by IPA?

Reply via email to