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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,60dd4fe7723c0ef X-Google-Attributes: gid103376,public From: tmoran@bix.com Subject: C_Pass_By_Value, was Re: Ada Core Technologies announces GNATCOM Date: 2000/04/12 Message-ID: #1/1 X-Deja-AN: 610314491 References: <8d0ru2$arc$1@nnrp1.deja.com> X-Complaints-To: abuse@pacbell.net X-Trace: news.pacbell.net 955564897 206.170.2.119 (Wed, 12 Apr 2000 11:41:37 PDT) Organization: SBC Internet Services NNTP-Posting-Date: Wed, 12 Apr 2000 11:41:37 PDT Newsgroups: comp.lang.ada Date: 2000-04-12T00:00:00+00:00 List-Id: > Fix the RM! The RM is plain wrong, just due to misunderstanding > of C. It is obvious that a record passed as an IN parameter > should map to a C struct passed as a value parameter. In K&R C a struct cannot be passed to a function. So why not interpret "pragma Import(C," as "sort of K&R C as far as records are concerned" and add "pragma Import(Ansi_C," to mean "like Ansi C, allow record parameters, and pass such IN parameters by value". (Granted "Ansi_StdCall" would really start looking wierd, but "Correct_StdCall" or "StdCall_ca_1995" have problems too.)