From: Martin Krischik <krischik@users.sourceforge.net>
Subject: Re: Where are returned values stored?
Date: Sun, 30 May 2004 09:10:38 +0200
Date: 2004-05-30T09:10:38+02:00 [thread overview]
Message-ID: <1172962.5YVFDR7a85@linux1.krischik.com> (raw)
In-Reply-To: 3bxeqHcbeKgM@eisner.encompasserve.org
Larry Kilgallen wrote:
> In article <60328483.MtZnWf8h2m@linux1.krischik.com>, Martin Krischik
> <krischik@users.sourceforge.net> writes:
>> Warren W. Gay VE3WWG wrote:
>>
>>> > Interesting to consider this with a recursive procedure, but yes, it
>>> > should work.
>>> >
>>> > JAF
>>>
>>> Calling Conventions:
>>>
>>> If this indeed happens (on a given platform), I would think
>>> that the calling convention used is +critical+. For example,
>>> if you forced an Ada routine to use the C calling convention,
>>> I would bet that on most platforms, that all return values
>>> must be _copied_ or placed on the heap (temporarily). At least
>>> this would be true for strings/arrays etc. where the size
>>> was not known in advance.
>
> Just jumping in, this seems to be an OS-independent discussion.
The OP is involved in C - Ada mixed language programming.
>> The "C" calling convention places the return value inside a hidden static
>> variable. A pointer to this variable is then returned.
>
> I am not sure what you mean by "the" C calling convention.
Whatever K&R though is practical for there programming language. For use
from Ada see also RM B.3 (1/1).
> Certainly on VMS C obeys the OS calling convention for all inter-module
> calls, just as other languages do.
As does Windows and OS/2. It seems that almost everywhere the C compilers
don't use calling convention "C" anymore for anything but printf and scanf.
With Regards
Martin
--
mailto://krischik@users.sourceforge.net
http://www.ada.krischik.com
next prev parent reply other threads:[~2004-05-30 7:10 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-26 19:46 Where are returned values stored? (follow up to yesterday's question) James Alan Farrell
2004-05-26 20:44 ` Simon Wright
2004-05-27 7:51 ` Dmitry A. Kazakov
2004-05-27 9:39 ` Where are returned values stored? Marius Amado Alves
2004-05-27 17:05 ` Warren W. Gay VE3WWG
2004-05-27 20:24 ` James Alan Farrell
2004-05-28 20:33 ` Warren W. Gay VE3WWG
2004-05-29 7:03 ` Martin Krischik
2004-05-29 13:19 ` Larry Kilgallen
2004-05-30 7:10 ` Martin Krischik [this message]
2004-06-02 3:14 ` Robert I. Eachus
2004-05-30 21:17 ` Nick Roberts
2004-05-31 12:58 ` Warren W. Gay VE3WWG
2004-06-02 4:07 ` Robert I. Eachus
2004-06-02 12:42 ` Warren W. Gay VE3WWG
2004-06-03 2:00 ` Nick Roberts
2004-06-03 4:34 ` Robert I. Eachus
2004-06-03 16:06 ` Warren W. Gay VE3WWG
2004-06-03 16:13 ` Nick Roberts
2004-06-07 1:53 ` Robert I. Eachus
2004-06-07 13:09 ` Larry Kilgallen
2004-06-09 7:03 ` Robert I. Eachus
2004-06-05 17:13 ` Simon Wright
2004-05-27 17:11 ` Martin Krischik
2004-05-27 17:07 ` Where are returned values stored? (follow up to yesterday's question) Martin Krischik
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox