<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 - Many arguments to function causes false use of undeclared identifier"
   href="https://bugs.llvm.org/show_bug.cgi?id=33162">33162</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Many arguments to function causes false use of undeclared identifier
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>3.8
          </td>
        </tr>

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

        <tr>
          <th>OS</th>
          <td>Linux
          </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>wsnyder@wsnyder.org
          </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=18506" name="attach_18506" title="param_32k.c test file">attachment 18506</a> <a href="attachment.cgi?id=18506&action=edit" title="param_32k.c test file">[details]</a></span>
param_32k.c test file

With the attached file,

$ clang ./param_32k.c
./param_32k.c:4103:18: error: use of undeclared identifier 'd32767'; did you
mean 'd32768'?

This program works with GCC. It appears that clang gets confused by the use of
over 32,768 arguments to this function. Perhaps a "signed short" is used
somewhere by mistake?

While this seems contrived, this is machine generated code (probably obviously)
from a Verilog-to-C++ compiler called Verilator.

It would be nice to have more than 64K arguments allowed, as at present clang
does not have any other limits I am aware of that Verilator has found and needs
to work around (unlike MSVC++), but if not desired to be supported a clean
error message should be provided (presumably at the 32K-1st argument).</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>