From: Peter Chapin <PChapin@vtc.vsc.edu>
Subject: Re: Interfacing enums with C
Date: Sun, 17 Aug 2014 18:48:17 -0400
Date: 2014-08-17T18:48:17-04:00 [thread overview]
Message-ID: <0JKdnW2RMsGvrGzO4p2dnAA@giganews.com> (raw)
In-Reply-To: <lsr0tk$559$2@speranza.aioe.org>
On 2014-08-17 15:48, Victor Porton wrote:
>> http://www.ada-auth.org/standards/12rm/html/RM-B-1.html 14/3 - 18
>> does not say that enumeration types are eligible for convention C.
>>
>> So, in my opinion, RM does not require the following code to be
>> compilable:
>>
>> type Option_Type is (A, B)
>> with Convention => C;
>>
>>> And your first interfacing convention is much better. IMO.
>
> BTW, I could propose enumeration type to be eligible for Convention C in the
> next version of Ada RM!
FWIW, GNAT does allow 'Convention => C' for enumeration types. So
Simon's suggestion should work with GNAT if you are willing to make use
of a GNAT extension.
Peter
next prev parent reply other threads:[~2014-08-17 22:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-17 19:02 Interfacing enums with C Victor Porton
2014-08-17 19:39 ` Simon Wright
2014-08-17 19:46 ` Victor Porton
2014-08-17 19:48 ` Victor Porton
2014-08-17 22:48 ` Peter Chapin [this message]
2014-08-18 9:19 ` Simon Wright
2014-08-18 9:17 ` Simon Wright
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox