Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!.POSTED!not-for-mail From: BGB Newsgroups: comp.lang.java.programmer Subject: Re: =?UTF-8?B?QW5kcm9pZOKAlFdoeSBEYWx2aWs/?= Date: Fri, 03 Jun 2011 16:04:30 -0700 Organization: albasani.net Lines: 93 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.albasani.net F8roVCYZm4ow1IfH3uMbqCahsxq+wbBHmIaX9TnMSho+iYaMP68nQr2KHXG19M+Pu8Nepm/LkSWn+Nqy/rsyzQ== NNTP-Posting-Date: Fri, 3 Jun 2011 23:07:39 +0000 (UTC) Injection-Info: news.albasani.net; logging-data="9waWTUapvyRGbKkWnVrFvdegZdXKZ5sLHJ+Yjw+TvgrcfL5x5SVC/lifjn3cOufTp+h3pTKw35DXm7gzxkh9MchiYkBeKx77n7kmX5R+3DCidRSDDGqCDHeKYmtq3Jqs"; mail-complaints-to="abuse@albasani.net" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10 In-Reply-To: Cancel-Lock: sha1:11d590LRAHfOq+rK55ld9IpZpTw= Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:4956 On 6/3/2011 2:06 PM, Michael Wojcik wrote: > BGB wrote: >> On 6/3/2011 6:40 AM, Michael Wojcik wrote: >>> BGB wrote: >>>> >>>> yeah... sadly, the C ABI is a little bit prone to variations >>> >>> There is no "C ABI". If you believe otherwise, please cite the >>> appropriate language from ISO/IEC 9899. I'll accept any version. > => >> more like "there is no universal standardized C ABI...", and nothing is >> stated in the C standards to this effect, but, there ARE C-ABIs... > > Wrong. Those are platform ABIs. They have nothing to do with C, a > language defined by ISO/IEC 9899, and not by implementations thereof > or their dependencies. > they are used for C, and defined in relation to C, and if one uses a different ABI, their code doesn't work on the given platform... so, same-difference really... it is thus mandatory supplementary material. >> http://en.wikipedia.org/wiki/X86_calling_conventions >> >> note also: >> http://agner.org./optimize/calling_conventions.pdf > > Neither of which have anything to do with C. > >> much like there is a C++ ABI (or more correctly, many C++ ABIs...). > > Yes, insofar as there is no C++ ABI (much less "many C++ ABIs"). > >> but, the "standardized" (in a largely de-facto sense) ABI for C on >> 32-bit x86 is commonly known as cdecl, but it has other names. > > Microsoft's cdecl calling convention for Windows has nothing to do > with C, despite the name. > cdecl is also used on Linux on x86, and several other OS's (AFAIK FreeBSD and others), and so is not specific to MS. MS's own convention, "stdcall", is used far less often... >> in its common form: > > Details are irrelevant. And feel free to devote similar efforts to > your grandmother's egg-sucking edification; I've been dealing with the > inner details of various ABIs for a quarter-century. > I also write compilers... the details *are* the thing in question. a computer is itself details, as are programming languages, and there is nothing apart from its details. >> now, the issue is that not all compilers exactly agree on all the >> details, and these subtle differences can at times break code linked >> together from different compilers... > > No, the issue is that you apparently don't know what is and is not > part of the C language, and that you have a regrettable tendency to > wander off into irrelevant tangents. > the pure C standard, by itself, would be effectively useless for getting much done. much of its utility is due to all of this other stuff, which FWIW, is treated as if it were a part of the language, as it exists on the platforms in question. the matter then of how it exists on other platforms, well, that is how it exists there, and one can consider it in the context of those platforms, if it is within the confines of relevance to do so. portability as far as applications are concerned can usually be described as: "does it work on these N systems I care about?". beyond this: who knows, who cares, it is a matter for another day...