Topic: Rules for ellipsis activation frame?


Author: reid@cps.msu.edu (Dr Richard J. Reid)
Date: 15 Apr 1994 19:16:44 GMT
Raw View
Is there a source for the implementation rules
for how the actual parameters are placed
in the activation frame when they are
coming in under ellipsis?

It appears that primitive types and
user-defined types are treated
differently--probably for C compatibility
(for primitives) and user-type generality.

Both g++ and Sun-C++ seem to do them in
the same way.

Thanks,

Dick




Author: b91926@fsgi01.fnal.gov (David Sachs)
Date: 15 Apr 1994 16:58:44 -0500
Raw View
reid@cps.msu.edu (Dr Richard J. Reid) writes:

>Is there a source for the implementation rules
>for how the actual parameters are placed
>in the activation frame when they are
>coming in under ellipsis?

Yes there is, but it may differ between
implmentations.  The include file <stdarg.h>
contains the definitions needed to use
variable argument lists.

In general, for C and C++ programs, you must
follow the following rules:

There must be at least one non-variable argument.

You must be able to determine the existence and
the type of each variable argument BEFORE you
attempt to reference it. You can use information
from global variables and from PRECEDING arguments
to make this determination.