Re: Question about function call stack

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux