View Single Post
  #18 (permalink)  
Old 08-10-2009, 09:12 PM
James Kuyper
Guest
 
Posts: n/a
Default Re: passing to C function less argument than required

George Neuner wrote:
> DIE MASSEN TRANKEN BIER IN MASSKRÜGENOn Tue, 21 Jul 2009 11:55:24
> -0500 (CDT), Kenneth Brody <kenbrody@spamcop.net> wrote:
>

.....
>> You are assuming that the called function clears the stack, which is not
>> necessarily correct. I don't know if the Standard says if the caller or
>> callee clears the stack (I don't think it does), but on every system Ican
>> think of where I've used a C compiler, the calling function is responsible.
>> In fact, in the case of varadic functions (such as printf), the calling
>> function must be the one to clear the stack, as it is the only one that
>> knows how to do so.

>
> The C standard specifies "caller-pops".


Citation, please?
--
comp.lang.c.moderated - moderation address: clcm@plethora.net -- you must
have an appropriate newsgroups line in your header for your mail to be seen,
or the newsgroup name in square brackets in the subject line. Sorry.
Reply With Quote