comp.lang.ada
 help / color / mirror / Atom feed
From: Per Sandberg <per.s.sandberg@bahnhof.se>
Subject: Re: Unchecked_Union record inside an other record - trouble
Date: Sun, 10 Aug 2014 09:25:17 +0200
Date: 2014-08-10T09:25:17+02:00	[thread overview]
Message-ID: <53e71e5e$0$32527$862e30e2@ngroups.net> (raw)
In-Reply-To: <ls3f3s$e4r$2@dont-email.me>

Yes of couse -fdump-ada-spec is for GCC-gnat but even if you want to 
take a small subset I find it more efficent and much less errorprone to 
start with the generated spec:s and edit the generated code  afterwards.

(have done this with a fairtly large API:

550 header-files
7500 methods
5500 types

and some small ones as well.

/per

On 08.08.2014 23:23, Jeffrey Carter wrote:
> On 08/08/2014 12:21 PM, Per Sandberg wrote:
>> You shall not try to write interface code by hand you shall use the
>> compiler
>>      gcc -c -fdump-ada-spec <more arguments and files>
>> see GNAT Users guide.
>>
>> Since humans makes a heap load of errors and erronous asumptions when
>> they try
>> to translate the contents of a .h file to an .ads file, the compiler
>> does a much
>> better job.
>
> While I agree with you in general, the results of -fdump-ada-spec need
> to be manually massaged since it produces non-portable,
> compiler-dependent code, such as using Address for C pointers. It may
> also be preferable to create a binding by hand if you only want a small
> subset of a large header.
>


      reply	other threads:[~2014-08-10  7:25 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-08 15:36 Unchecked_Union record inside an other record - trouble Victor Porton
2014-08-08 16:01 ` Adam Beneschan
2014-08-08 16:56   ` Victor Porton
2014-08-08 18:52     ` Shark8
2014-08-08 19:56       ` Victor Porton
2014-08-08 20:06         ` Pascal Obry
2014-08-08 20:09         ` Shark8
2014-08-08 20:12           ` Victor Porton
2014-08-08 20:22             ` Shark8
2014-08-08 20:28               ` Victor Porton
2014-08-08 21:07                 ` Shark8
2014-08-08 19:52   ` Victor Porton
2014-08-08 19:57     ` Adam Beneschan
2014-08-08 19:21 ` Per Sandberg
2014-08-08 20:01   ` Victor Porton
2014-08-08 21:23   ` Jeffrey Carter
2014-08-10  7:25     ` Per Sandberg [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox