<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 --- - clang-cl doesn't forward declare a struct when it first sees it in the list of arguments in C mode"
   href="http://llvm.org/bugs/show_bug.cgi?id=20178">20178</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>clang-cl doesn't forward declare a struct when it first sees it in the list of arguments in C mode
          </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>All
          </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>ehsan@mozilla.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 test.c
void f(struct foo*);
struct foo { int x; };
void f(struct foo* f) {}

$ cl -c test.c

$ clang-cl -c test.c
test.c(1,15) :  warning: declaration of 'struct foo' will not be visible
outside of this function [-Wvisibility]
void f(struct foo*);
              ^
test.c(3,6) :  error: conflicting types for 'f'
void f(struct foo* f) {}
     ^
test.c(1,6) :  note: previous declaration is here
void f(struct foo*);
     ^
1 warning and 1 error generated.

clang-cl accepts this program in C++ mode.</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>