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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,9d63f462ee97dc01 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!postnews.google.com!i6g2000yqj.googlegroups.com!not-for-mail From: =?ISO-8859-1?Q?Hibou57_=28Yannick_Duch=EAne=29?= Newsgroups: comp.lang.ada Subject: Re: C interface using a record with discriminant and representation clauses Date: Sat, 4 Jul 2009 20:17:43 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <4b0ca7ca-e84c-43a6-b3d3-6793d54da91b@z14g2000yqa.googlegroups.com> NNTP-Posting-Host: 86.66.190.37 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1246763863 24388 127.0.0.1 (5 Jul 2009 03:17:43 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sun, 5 Jul 2009 03:17:43 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: i6g2000yqj.googlegroups.com; posting-host=86.66.190.37; posting-account=vrfdLAoAAAAauX_3XwyXEwXCWN3A1l8D User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; fr),gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:6838 Date: 2009-07-04T20:17:43-07:00 List-Id: An anwser here : http://www.adapower.com/index.php?Command=Class&ClassID=Advanced&CID=228 says (at the end): > You need rep specs to handle tricky and unusual cases such as: > > * Mapping Ada record types with a discriminant and a variant part onto > C unions. This can be made to work as long as the C type has a member > that can serve as the discriminant; most sensibly designed C code does. > > [...] > > If you use rep specs, you should not need pragma Convention, and vice versa. So this suggest that representation specs and pragma convention should not be used simultaneously, as I've done due to some doubts. Using representation specs is Ok, but the pragma Convention is to be removed (will be done in a minute).