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=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,fd173879a595bde X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!nntp.comcast.com!news.comcast.com.POSTED!not-for-mail NNTP-Posting-Date: Sat, 05 Nov 2005 12:24:08 -0600 From: tmoran@acm.org Newsgroups: comp.lang.ada Subject: Re: ADA/C interfaces: type representations uncontrollable in C References: X-Newsreader: Tom's custom newsreader Message-ID: Date: Sat, 05 Nov 2005 12:24:09 -0600 NNTP-Posting-Host: 24.6.102.223 X-Trace: sv3-8Q3AamNYX40jHB+RnbA6AnpgYYnJjhoAG7AmAYh3ioRPwl+3qD0H42PKTjWfE8IHmmFxnhgjVsJLmUi!+neasegnTUIn5SOkS0npbEGTkiUHnfirr5D6IiO3j1PVx50jeJXdKfAbbNiqGbCZEs8rs72LUZ+w X-Complaints-To: abuse@comcast.net X-DMCA-Complaints-To: dmca@comcast.net 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.32 Xref: g2news1.google.com comp.lang.ada:6246 Date: 2005-11-05T12:24:09-06:00 List-Id: > I'm beginning to realize that it's impossible to write compiler > independant ADA code if it must interface with C code. Even rep > spec'ing down to the bitwise rep specs makes no guarantess that the > chosen layout will match what all C compilers produce (since they can > potentially all be different). Yes, "it's impossible to write compiler independant" C code since C compilers can potentially all be different. More commonly you are interfacing to an existing C system, which is compiled with a particular C compiler, eg, Windows and MS C++. In that case there is a non-moving target and you can write Ada code that is nearly* independent of the particular Ada compiler. *Particular Ada compilers have quirks and bugs that you may have to get around in different ways. CLAW's rep spec clauses for instance work fine with MS Windows, but there are a few other things where there's different code for different Ada compilers, and one of the tasks is keeping up with the latest versions of compilers.