From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.182.104.200 with SMTP id gg8mr8076732obb.45.1396192484249; Sun, 30 Mar 2014 08:14:44 -0700 (PDT) Path: backlog4.nntp.dca3.giganews.com!border2.nntp.dca.giganews.com!border1.nntp.hkg.giganews.com!news.netfront.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!news.glorb.com!l13no510858iga.0!news-out.google.com!du2ni18264qab.0!nntp.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!news.giganews.com.POSTED!not-for-mail NNTP-Posting-Date: Sun, 30 Mar 2014 10:14:44 -0500 Date: Sun, 30 Mar 2014 11:14:43 -0400 From: Peter Chapin User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Your wish list for Ada 202X References: <7f1c01c5-3563-4b94-9831-152dbbf2ecdc@googlegroups.com> <1656778100417879549.835031laguest-archeia.com@nntp.aioe.org> In-Reply-To: Message-ID: X-Usenet-Provider: http://www.giganews.com X-Trace: sv3-cH2YlhLGzwDJqri3FNnk+YhJaZJhxWMtfcqp0WpJYbhfp2a8nMbVgQ03pBJeN5NJ5CtdMGtxWF1Z1Rd!iiWC4AYgU6TIdWIDpFQHiY3/bT0Do+sLQOJPtbpEX0b2Y0UCmXD0ENc/ga9wEn4= X-Complaints-To: abuse@giganews.com X-DMCA-Notifications: http://www.giganews.com/info/dmca.html X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 2597 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Xref: number.nntp.dca.giganews.com comp.lang.ada:185418 Date: 2014-03-30T11:14:43-04:00 List-Id: On 2014-03-30 10:28, Simon Clubley wrote: > Also, I'm not quite sure what you mean by the latter. As far as I can see, > the parameter passing would be left to right, just as it is in C. Typical C compilers push arguments onto the stack from right to left. This is done to support variable length parameter lists such as what printf() has. For example printf("%d\n", some_integer); The printf function expects to find a pointer to the format string on the top of the stack. It reads that string to find out what other arguments to expect and then it indexes down the stack to get them. If the compiler pushed arguments from left to right the critical pointer to the format string would be beneath an unknown number of other arguments. Standard C requires that functions with variable length parameter lists be prototyped (this is a break from pre-standard C). This gives compiler writers the option of using a different calling convention by default and something special for functions with variable length parameters, since the compiler can be sure such functions will be prototyped and thus known to the compiler. Some compilers do take advantage of this and will incorrectly compile calls to printf() if one does not #include or otherwise provide a prototype for printf(). Peter