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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!news1.google.com!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post02.iad.highwinds-media.com!news.flashnewsgroups.com-b7.4zTQh5tI3A!not-for-mail Newsgroups: comp.lang.ada Subject: Re: Record representation : components order References: <908a786e-214e-436f-868b-c0ead259fcc5@r33g2000yqn.googlegroups.com> <055e4e4e-94ec-40fb-b317-4f45a579148a@c9g2000yqm.googlegroups.com> <0528ea71-d39b-4c0f-ae70-b632c6b4fbeb@c36g2000yqn.googlegroups.com> <62950d1f-1111-4cf9-90d8-201a0fea718e@r33g2000yqn.googlegroups.com> From: Stephen Leake Date: Fri, 10 Jul 2009 01:26:18 -0400 Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (windows-nt) Cancel-Lock: sha1:MEPaEghLR36k2gPI3N07biR1Wfk= MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Complaints-To: abuse@flashnewsgroups.com Organization: FlashNewsgroups.com X-Trace: 788344a56d0eae9cadf9d04098 Xref: g2news2.google.com comp.lang.ada:6929 Date: 2009-07-10T01:26:18-04:00 List-Id: sjw writes: > On Jul 9, 10:28�am, Stephen Leake > wrote: >> sjw 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