https://bugs.llvm.org/show_bug.cgi?id=32768

            Bug ID: 32768
           Summary: Missing "-Wuninitialized" warning after adding a no-op
                    `(void)` cast
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]

The following code won't produce a `-Wuninitialized` for `a`:

    int main()
    {
        int *a;
        (void) &a;

        *a = 4;
        return 0;
    }

---

The following code will produce a `-Wuninitialized` for `a`:

    int main()
    {
        int *a;
        // (void) &a;

        *a = 4;
        return 0;
    }

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to