How to deal with va_xxx constructions?

Hello,

I have the following piece of code:

static void *Circle_ctor( void *_self, va_list *app )
{
    struct Circle *self = ( (const struct Class *) Point )->ctor( _self, app );

    self->rad = va_arg( *app, int );
    return self;
}

When I compile this, I have the following error:

Build target 'Adt - Point'
compiling Circle.c...
CIRCLE.C(26): error C212: indirect call: parameters do not fit within registers

There are apparently problems by passing a pointer to a variable arg list to a function pointer (represented by ctor.
The error message is clear and I've read the passage in app note 129, section ARGUMENT LIST LIMITS, second paragraph, but since I don't know in advance how many parameters will be passed, I can't use a pointer to a structure...

What can be done to go around this problem?

Rgds,

Geert

More questions in this forum