<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </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 - Misleading warning produced for tentative array definition"
   href="https://bugs.llvm.org/show_bug.cgi?id=34092">34092</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Misleading warning produced for tentative array definition
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>unspecified
          </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>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>rda@lemma-one.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=18918" name="attach_18918" title="Example of tentative definitions. Compile with clang -o tentative tentative.c">attachment 18918</a> <a href="attachment.cgi?id=18918&action=edit" title="Example of tentative definitions. Compile with clang -o tentative tentative.c">[details]</a></span>
Example of tentative definitions. Compile with clang -o tentative tentative.c

It is valid (if strange) C to give a tentative definition of an array with an
array bound unspecified and then specify the bound in a subsequent declaration.
clang immediately issues a warning "tentative array definition assumed to have
one element" when it encounters the tentative definition. This is misleading
because the compiler should not make that assumption until it has processed the
entire translation unit and found that the composite type has an unspecified
bound. (See C99 section 6.9.2 External Object Definitions, particularly Example
2.)

The attached example shows that the compiler is actually conforming with the
standard despite the warning.</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>