<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 --- - -Wall does not enable -Wconditional-uninitialized"
   href="http://llvm.org/bugs/show_bug.cgi?id=17974">17974</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>-Wall does not enable -Wconditional-uninitialized
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>3.3
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Macintosh
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>MacOS X
          </td>
        </tr>

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

        <tr>
          <th>Severity</th>
          <td>normal
          </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>christophe@taodyne.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><a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED INVALID - Undetected use of uninitialised variable (detected at -O2 -Wall by gcc)"
   href="show_bug.cgi?id=17940">Bug #17940</a> reported a case where gcc reports an uninitialised variable at -Wall
-O2, but clang does not. The bug was marked as "RESOLVED INVALID" because the
option -Wconditional-uninitialized exposes the bug. So I'm opening a new bug
because -Wall obviously does not enable that option:

ddd@Marypuce ~> clang -Wall -c -O2 /tmp/undetected.cpp 
ddd@Marypuce ~> clang -Wconditional-uninitialized -c -O2 /tmp/undetected.cpp 
/tmp/undetected.cpp:9:12: warning: variable 'result' may be uninitialized when
      used here [-Wconditional-uninitialized]
    return result;
           ^~~~~~
/tmp/undetected.cpp:6:17: note: initialize the variable 'result' to silence
this
      warning
    char *result;
                ^
                 = 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>