<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 --- - No -Wuninitialized warning on uninitialized array element."
   href="http://llvm.org/bugs/show_bug.cgi?id=22318">22318</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>No -Wuninitialized warning on uninitialized array element.
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Windows NT
          </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>Frontend
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>chengniansun@gmail.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>$: cat s.c
int f1() {
  int arr[2][2];
  return arr[0][0];
}

int f2() {
  int a;
  return a;
}
$: 
$: clang-trunk -c -Weverything -Wno-missing-prototypes s.cs.c:8:10: warning:
variable 'a' is uninitialized when used here
      [-Wuninitialized]
  return a;
         ^
s.c:7:8: note: initialize the variable 'a' to silence this warning
  int a;
       ^
        = 0
1 warning generated.
$: 
$: gcc-trunk -c -Wall s.c
s.c: In function ‘f1’:
s.c:3:10: warning: ‘arr[0][0]’ is used uninitialized in this function
[-Wuninitialized]
   return arr[0][0];
          ^
s.c: In function ‘f2’:
s.c:8:10: warning: ‘a’ is used uninitialized in this function [-Wuninitialized]
   return a;
          ^
$:</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>