From: Stephen Leake <stephen_leake@stephe-leake.org>
Subject: Re: Record representation : components order
Date: Fri, 10 Jul 2009 01:26:18 -0400
Date: 2009-07-10T01:26:18-04:00 [thread overview]
Message-ID: <uk52h3y85.fsf@stephe-leake.org> (raw)
In-Reply-To: 62950d1f-1111-4cf9-90d8-201a0fea718e@r33g2000yqn.googlegroups.com
sjw <simon.j.wright@mac.com> writes:
> On Jul 9, 10:28�am, Stephen Leake <stephen_le...@stephe-leake.org>
> wrote:
>> sjw <simon.j.wri...@mac.com> writes:
>
>> > * in theory tcladashell is compiler-independent.
>>
>> That's not important. You only need to generate the Ada code once
>> (well, once each time the C code changes); then you can use it with
>> any compiler. So only the tcladashell maintainer/developer needs
>> -fdump-ada-spec.
>
> This is perhaps an unusual example, and I'm not sure it would actually
> happen, but:
>
> struct {
> int i;
> #ifdef SOME_BIZARRE_COMPILER_I_DONT_HAVE_BUT_YOU_DO
> int j;
> #endif
> } foo;
More likely the #ifdef is on the OS; for example, the "fstat" struct
has different components on different operating systems. In either
dase, the solution is the same as below.
>
> Also, I tried 'gcc -fdump-spec /usr/include/tcl.h' and got the
> following out:
>
> i386_utypes_h.ads
> stdarg_h.ads
> stdio_h.ads
> sys_utypes_h.ads
> tcl_h.ads
> tcldecls_h.ads
> tclplatdecls_h.ads
> utypes_h.ads
>
> and stdio_h.ads contains eg
> subtype size_t is i386_utypes_h.uu_darwin_size_t;
>
> so I could hardly hope that would work with Aonix on Windows!
Ok, so you need to keep track of separate Ada files for each target,
where a target is a combination of Ccompiler and OS.
You still only run -fdump-ada-spec when the C code changes.
--
-- Stephe
next prev parent reply other threads:[~2009-07-10 5:26 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-04 21:08 Record representation : components order Hibou57 (Yannick Duchêne)
2009-07-05 3:14 ` Hibou57 (Yannick Duchêne)
2009-07-05 10:16 ` sjw
2009-07-06 7:33 ` Stephen Leake
2009-07-07 19:37 ` sjw
2009-07-09 9:28 ` Stephen Leake
2009-07-09 19:16 ` sjw
2009-07-10 5:26 ` Stephen Leake [this message]
2009-07-06 7:29 ` Stephen Leake
2009-07-06 8:07 ` Jean-Pierre Rosen
2009-07-05 14:10 ` Stephen Leake
2009-07-06 2:57 ` Hibou57 (Yannick Duchêne)
2009-07-06 8:27 ` Jacob Sparre Andersen
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox