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 Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!nntp-feed.chiark.greenend.org.uk!ewrotcd!newsfeed.xs3.de!news.jacob-sparre.dk!franka.jacob-sparre.dk!pnx.dk!.POSTED.rrsoftware.com!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Making the same mistake as the broken C interface to fortran Date: Wed, 3 Jul 2019 14:02:43 -0500 Organization: JSA Research & Innovation Message-ID: References: <2uYSE.298383$sJ3.119314@fx04.am4> Injection-Date: Wed, 3 Jul 2019 19:02:44 -0000 (UTC) Injection-Info: franka.jacob-sparre.dk; posting-host="rrsoftware.com:24.196.82.226"; logging-data="24922"; mail-complaints-to="news@jacob-sparre.dk" X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Response X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.7246 Xref: reader01.eternal-september.org comp.lang.ada:56807 Date: 2019-07-03T14:02:43-05:00 List-Id: "Chris M Moore" wrote in message news:2uYSE.298383$sJ3.119314@fx04.am4... ... > So the question is do we break the API or not? That's not the question. The question is ensuring that the Ada compiler properly implements the Fortran convention. If it does, then the API doesn't change. And if it doesn't, then fix the silly compiler (or get a different one that does the right thing). The Annex B "Implementation Advice" (specifically, B.5(22-26)) is very close to a requirement, in that the interface is not useful if one can't depend on the mapping. If your worrying about what hack to use to make a broken compiler work (hopefully only because you need an immediate solution), the answer ought to be that no one cares -- do whatever makes sense. Because no one should be *requiring* an Ada compiler to do the wrong thing, so when the bug is ultimately fixed, you'll have to revert to some version of the original API. (That to me suggests using a thicker binding -- which is always preferable anyway IMHO -- raw C or Fortran interfaces don't make good Ada libraries.) BTW, I note that type Fortran_Character is in fact an array type, so that could be confusing some readers of the API (it surely would have confused me). Randy. We could make the > bindings thicker and thus slower. Or break the typing and force client > software to change. The software engineer in me says the former but I'm > not a user of this API so I doubt my views count for much. > > -- > sig pending (since 1995)