<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - -Wconditional-uninitialized false positive"
   href="http://llvm.org/bugs/show_bug.cgi?id=18709">18709</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>-Wconditional-uninitialized false positive
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>3.4
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>-New Bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>htam@apple.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>-Wconditional-uninitialized leads to a number of false positives when variables
are conditionally saved and restored, even though the condition doesn't change
throughout the function.

$ cat foo.c
void foo(int bar) {
   int baz = 0;
   int baz_save;

   if (bar) baz_save = baz;
   if (bar) baz = baz_save;
}

$ clang foo.c -Wconditional-uninitialized -o /dev/null -c
foo.c:6:20: warning: variable 'baz_save' may be uninitialized when used here
     [-Wconditional-uninitialized]
   if (bar) baz = baz_save;
                  ^~~~~~~~
foo.c:3:17: note: initialize the variable 'baz_save' to silence this warning
   int baz_save;
               ^
                = 0
1 warning generated.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>