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=2.2 required=5.0 tests=BAYES_00,FROM_WORDY, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,ac02560f0af03a21 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-12-26 11:04:41 PST Path: archiver1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!zeus.visi.com!news-out.visi.com!petbe.visi.com!nntp.abs.net!rcn!feed3.news.rcn.net!not-for-mail Reply-To: "Frank J. Lhota" From: "Frank J. Lhota" Newsgroups: comp.lang.ada References: <3FEC43B2.5080606@noplace.com> <1072450300.440355@master.nyc.kbcfp.com> <3FEC4E89.2070804@noplace.com> <1083935.L00VuFytUj@linux1.krischik.com> Subject: Re: GNAT parameter passing, C-style? Date: Fri, 26 Dec 2003 14:04:36 -0500 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Message-ID: <3fec8648$0$4752$61fed72c@news.rcn.com> NNTP-Posting-Host: 209.6.176.101 X-Trace: 1072465480 reader3.news.rcn.net 4752 209.6.176.101:1906 X-Complaints-To: abuse@rcn.com Xref: archiver1.google.com comp.lang.ada:3825 Date: 2003-12-26T14:04:36-05:00 List-Id: "Martin Krischik" wrote in message news:1083935.L00VuFytUj@linux1.krischik.com... > Luke A. Guest wrote: > > No. IBM and Microsoft for example went to what you call "Pascal" convention > when moving from 16bit to 32bit for OS and Compiler. They only use "C" > convention when you explicitly request it. Or when a variable parameter > list is used. That's not quite correct. The 16-bit Windows API used the Pascal calling convention for every function that did not have a variable parameter list. In the Win32 API, Microsoft used the STDCALL calling convention for all functions that did not have a variable parameter list. The STDCALL convention was a mix of the Pascal and C conventions: the parameters were pushed on the stack in reverse order (i.e. the C order), but they were popped by the called function (as in Pascal). As to the compiler, there are command line options that specify what calling convention is used for a function when no convention is indicated in the code. In the absense of said command line parameters and any specification of calling conventions in the code, the default convention is C (parameters pushed in reverse order, and popped by the caller).