peter_ammon@rocketmail.com wrote:
[color=blue]
> The C++ grammar appears to admit (and g++ accepts)
>
> void function(...);[/color]
Yes, it's allowed.
[color=blue]
>
> In such a function, how do you access any of the parameters?[/color]
You cannot portably do so. It may be possible in
implementation-specific ways.
[color=blue]
> And what
> was the motivation for allowing functions of this type where C forbids
> them?[/color]
I don't know what the motivation was (apart from it being simpler
than disallowing them), but this does have useful consequences in
providing a worst-match for overload resolution, which can be
useful in situations such as template metaprogramming.
[color=blue]
> I also notice that C++ makes the comma optional, whereas it's mandatory
> in C. That is, this is a legal prototype:
>
> void function2(int ...);
>
> What is the motivation for this change?[/color]
D&E might answer that, though I'm not sure if it does and don't
have my copy handy right now to check.
-- James