This topic is now archived and is closed to further replies.


Is there a limit to function arguments?

Recommended Posts

There is not theoretical limit. However there may be some practical limitations :

- function arguments are put on the stack, which may overflow, even if it is unlikely to happen from the arguments of a single function (unless you have really big arguments passed by value).

- MSVC6 has a 255 character function identifier limit. And, for overloading purposes, it mangles function names, appending parameter type information to it. If the result is longer than 255 character, it gets truncated, which means that the compiler may not be able to distinguish between the two if the telltale identifiers have been cut off. This happens most frequently with templates.

- Your compiler may barf if you give it indigest code.

Share this post

Link to post
Share on other sites