From: Georg Bauhaus <rm.tsoh.plus-bug.bauhaus@maps.futureapps.de>
Subject: Re: Interfacing to C and long long data type
Date: Thu, 26 Jun 2008 12:19:32 +0200
Date: 2008-06-26T12:19:36+02:00 [thread overview]
Message-ID: <48636d38$0$7542$9b4e6d93@newsspool1.arcor-online.net> (raw)
In-Reply-To: <48635909.8060204@gmail.com>
S�bastien Morand wrote:
> Anyway when you interface Ada with C, you are loosing the portability of
> your program.
OTOH, in particular when using GNAT's native targets, there
is a good chance that you loose very little when interfacing
with C (as Maciej explains)---without proper C interfacing
there is just no Ada program when the runtime relies on C
conventions anyway. It has to, because among the facts of
life, one is that an OS is typically written in C.[*]
When your target is not native, again, chances are that
the OS infrastructure on which to build your Ada program uses
C conventions.
I won't mention the load of useful libraries that are,
unfortunately, written in &*-language. I won't be able
to use these libraries when you insist on Ada Only portability.
A better appraoch would seem to isolate the interfacing
parts and use redundant representation clauses and a handful
of tests. Running the test will not be the same as a careful
analysis of matching C/Ada representations. But at least they
can draw attention to this important issue.
-- Georg
___
[*] Another fact is that working for an investment bank and
working for an adventure game team show the same traits
and effects of addiction. Could this play a part
in how OS software is written...
next prev parent reply other threads:[~2008-06-26 10:19 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-25 15:23 Interfacing to C and long long data type Maciej Sobczak
2008-06-25 16:55 ` Keith Thompson
2008-06-25 21:35 ` Maciej Sobczak
2008-06-26 8:53 ` Sébastien Morand
2008-06-26 10:19 ` Georg Bauhaus [this message]
2008-06-26 11:59 ` Maciej Sobczak
2008-06-27 14:31 ` Sébastien Morand
2008-06-27 16:11 ` Dmitry A. Kazakov
2008-06-27 18:53 ` Adam Beneschan
2008-06-27 20:29 ` Simon Wright
2008-06-27 20:46 ` Dmitry A. Kazakov
2008-06-25 19:08 ` 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