Question about function call stack

Emmanuel Pacaud emmanuel.pacaud@free.fr
Wed Jan 18 07:25:00 GMT 2006


Perry Smith a écrit :

> With C, you can not really assume anything.
>
> If you are trying to do this for one particular platform, then you  
> can look at the code generated and eventually figure out how to do  
> what you want to do.  If you are doing 32 bit and 64 bit on one  
> platform, then you could #ifdef the two cases.

That's probably what I'll do. Or find an other way to implement what is 
currently done.

>
> But if you truly want portable code, then you need to either use  
> varargs or stdargs.  stdargs is part of the C standard I believe.  It  
> is pretty easy to use.

I guess varargs or stdargs are useles here, since the goal is to 
implement a function call with a variable number or arguments, not a 
function with a variable number of arguments.

Thanks for your answer,

        Emmanuel.



More information about the Gcc-help mailing list