Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Ian Collins Newsgroups: comp.lang.c Subject: Re: Stackoverflow, and how C uses stack to remember function calls Date: Sun, 5 Mar 2017 11:50:52 +1300 Lines: 19 Message-ID: References: <5a79a9c7-0feb-4721-8165-422de62ff21b@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net ibhnkhpUo5DhNEhRIR9aHgs8KHwQsYl077fl6ZGCSegJHV1LE3 Cancel-Lock: sha1:bxltz26Bb2nGGiOy2ot7NPrTf9U= User-Agent: Mozilla/5.0 (X11; SunOS i86pc; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 In-Reply-To: <5a79a9c7-0feb-4721-8165-422de62ff21b@googlegroups.com> Xref: csiph.com comp.lang.c:105396 On 03/ 5/17 11:33 AM, supercat@casperkitty.com wrote: > On Saturday, March 4, 2017 at 10:18:20 AM UTC-6, James R. Kuyper wrote: >> This is detail about how C is typically implemented. There's no >> requirement in the standard that it be implemented that way. On the >> platforms where it's used for C, it's also used, one way or another, by >> most of the other programming languages. > > The pattern was established as common on C compilers before the C89 Standard > was published, and on many platforms C compilers would use the pattern if > practical, so that functions written with different compilers could call > each other. It was never established as a part of an uppercase-S "Standard" > but in an era where compiler simplicity and interoperability were more > important than maximum compiled-code efficiency it worked well. The pattern in question is the platform ABI, which has nothing to do with the C standard, or what came before. -- Ian