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.1 required=5.0 tests=BAYES_00, PP_MIME_FAKE_ASCII_TEXT autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,235855e3822c83d1 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Received: by 10.68.125.233 with SMTP id mt9mr75086pbb.5.1334263640324; Thu, 12 Apr 2012 13:47:20 -0700 (PDT) MIME-Version: 1.0 Path: r9ni49010pbh.0!nntp.google.com!news2.google.com!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!nx01.iad01.newshosting.com!newshosting.com!news2.euro.net!newsfeed.x-privat.org!news.jacob-sparre.dk!munin.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Importing C function with variable argument list Date: Thu, 12 Apr 2012 15:47:14 -0500 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: <610ee323-4c7f-413d-8568-aed4955f5152@z38g2000vbu.googlegroups.com> <1288794.275.1334249936588.JavaMail.geo-discussion-forums@ynlp2> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: munin.nbi.dk 1334263638 31257 69.95.181.76 (12 Apr 2012 20:47:18 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Thu, 12 Apr 2012 20:47:18 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Received-Bytes: 2193 Date: 2012-04-12T15:47:14-05:00 List-Id: "Adam Beneschan" wrote in message news:1288794.275.1334249936588.JavaMail.geo-discussion-forums@ynlp2... On Thursday, April 12, 2012 3:08:28 AM UTC-7, Markus Sch�pflin wrote: ... >> So the note from the Ada RM does not seem to be followed by GNAT > >I don't think GNAT has a choice whether to follow it or not, since GNAT >can't be expected > to know what the code of the imported C subprogram is going to look like. > All it can do is > obey what the user tells it to do. Right. If the calling convention is different for normal C subprograms and vararg ones, then clearly there needs to be a different convention name for varargs. (As I noted, I've never worked on such a machine, but it doesn't surprise me that much that they exist.) Probably the RM ought to suggest such a convention name as Implementation Advice (something like C_Varargs) in order to increase portability. Someone ought to submit a suggestion to Ada-Comment so that it gets on the ARG's radar/agenda. Randy.