Jump to content
  • Advertisement

Archived

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

Squared

Is there a limit to function arguments?

This topic is 6003 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement
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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!