[cfe-dev] clang fails assertion given function with >256 parameters

Ted Kremenek kremenek at apple.com
Wed Oct 5 12:36:36 PDT 2011


I believe there is an open bug on this, but I forget the PR #.

The solution is for Clang to handle this.  We could easily do it (for example) with a side-table for the cases where functions exceed 256 arguments, since that wouldn't be the common case.  That solution also avoids the memory bloat.

On Oct 5, 2011, at 11:33 AM, John Garvin wrote:

> The clang compiler currently fails an assertion when given a function with more than 256 arguments. This started happening in John McCall's commit r130671, which changed the representation of parameters to reduce memory usage. Specifically, the parameter index (FunctionScopeIndex changed to ParameterIndex in the ParmVarDecl class in Decl.h) was changed from 16 bits to 8 bits.
> 
> Changing it back to 16 bits is one obvious solution, but it would increase memory usage. What's the right thing to do here?
> 
> John
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev




More information about the cfe-dev mailing list