<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><span class="vcard"><a class="email" href="mailto:rnk@google.com" title="Reid Kleckner <rnk@google.com>"> <span class="fn">Reid Kleckner</span></a>
</span> changed
<a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED DUPLICATE - Many arguments to function causes false use of undeclared identifier"
href="https://bugs.llvm.org/show_bug.cgi?id=33162">bug 33162</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">CC</td>
<td>
</td>
<td>rnk@google.com
</td>
</tr>
<tr>
<td style="text-align:right;">Status</td>
<td>NEW
</td>
<td>RESOLVED
</td>
</tr>
<tr>
<td style="text-align:right;">Resolution</td>
<td>---
</td>
<td>DUPLICATE
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED DUPLICATE - Many arguments to function causes false use of undeclared identifier"
href="https://bugs.llvm.org/show_bug.cgi?id=33162#c1">Comment # 1</a>
on <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED DUPLICATE - Many arguments to function causes false use of undeclared identifier"
href="https://bugs.llvm.org/show_bug.cgi?id=33162">bug 33162</a>
from <span class="vcard"><a class="email" href="mailto:rnk@google.com" title="Reid Kleckner <rnk@google.com>"> <span class="fn">Reid Kleckner</span></a>
</span></b>
<pre>Yes, this an undiagnosed implementation limit. If you compile your program with
assertions enabled, it will crash the compiler:
$ clang -c ~/Downloads/param_32k.c
Assertion failed: NumParams == params.size() && "function has too many
parameters", file C:\src\llvm-project\clang\lib\AST\Type.cpp, line 2662
I filed <a href="http://llvm.org/pr19607">http://llvm.org/pr19607</a> when I discovered this:
<span class="quote">> Relatedly, we cap out at 2**15 function parameters:
>
> $ cat t.py
> print 'void foo(',
> for i in range(0, 2**15):
> print 'int a%d,' % i,
> print 'int a%d);' % (i + 1)
>
> $ python t.py | clang -c -x c -
> Assertion failed: NumParams == params.size() && "function has too many parameters", file ..\tools\clang\lib\AST\Type.cpp, line 1604</span >
*** This bug has been marked as a duplicate of <a class="bz_bug_link
bz_status_NEW "
title="NEW - Undiagnosed implementation limit of 127 nested function prototypes"
href="show_bug.cgi?id=19607">bug 19607</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>