0

As far as I know, and could detect, the C99 document doesn't says something about this limitation.

And I would suggest, this is limited by the compiler. But I don't know what I would have to look for, to figgure this out.

So could anyone tell me whats the limited amount of Vargs by which compiler ( or who else does give this limitiation) and where I can check this.

dhein
  • 6,431
  • 4
  • 42
  • 74
  • 2
    Since I'm not 100% sure, I'd assume as many as fit on the stack, but at some point I'd really suggest passing some struct rather than single values. :) – Mario Jun 19 '14 at 06:59
  • https://gcc.gnu.org/onlinedocs/gcc-4.3.5/cpp/Implementation-limits.html doesn’t mention limitation on number of arguments so I's say is limited only by the stack – bolov Jun 19 '14 at 07:04
  • 1
    http://stackoverflow.com/questions/9034787/function-parameters-max-number this says 127 arguments – bolov Jun 19 '14 at 07:05
  • 1
    from a practical point of view the argument limitation should be imposed by stack size. – AngeloDM Jun 19 '14 at 07:23

1 Answers1

2

I just figured out what the standard says in C99 TC3 of function arguments it self.

I just found this:

5.2.4.1 Translation limits

The implementation shall be able to translate and execute at least one program that contains at least one instance of every one of the following limits:

[...]

— 127 arguments in one function call

I don't see a reason why the standard should specify this limitation more explicit. So this is what I have seen so far. And it should be the only lower limitation.

Lundin
  • 195,001
  • 40
  • 254
  • 396
dhein
  • 6,431
  • 4
  • 42
  • 74