From: "Martin Krischik" <Martin.Krischik@T-Online.de>
Subject: Re: Eliminating copying in Gnat
Date: Mon, 20 Jan 2003 19:34:10 +0100
Date: 2003-01-20T19:34:10+01:00 [thread overview]
Message-ID: <2ffh0b-tc5.ln@linux1.krischik.com> (raw)
In-Reply-To: 3E2C0E44.481AC15B@dassault-aviation.fr
On Mon, 20 Jan 2003 15:57:08 +0100, Damien CARBONNE wrote:
> Victor Porton wrote:
>> Is it possible to cause Gnat to not do unnecessary copying
>> when calling this fynction?
>>
>> function Pass(X: T) return T is
>> pragma Inline(Pass);
>> begin
>> return X;
>> end;
Funny as you say, I did the very same thing today and the compiler actualy
told me in no uncertain terms that it did not like it. But then I am a
masochist with all warnings swiched on.
> I'm not completely sure about it, but I would not put the "pragma
> Inline" at this place, but rather in the spec file (.ads).
>
> package XXX is
> function Pass(X:T) return T;
> pragma Inline(Pass);
> end XXX;
I think you are right. The compiler liked that Version much more.
With Regards
Martin.
PS: The Compiler used was GNAT for OS/2.
--
Martin Krischik
mailto://Martin@krischik.com
http://www.krischik.com
next prev parent reply other threads:[~2003-01-20 18:34 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-20 4:12 Eliminating copying in Gnat Victor Porton
2003-01-20 14:57 ` Damien CARBONNE
2003-01-20 15:03 ` Lutz Donnerhacke
2003-01-20 18:34 ` Martin Krischik [this message]
2003-01-20 15:08 ` Stephen Leake
2003-01-20 21:27 ` Victor Porton
2003-01-21 12:35 ` Georg Bauhaus
2003-01-21 19:21 ` Robert A Duff
2003-01-21 14:52 ` Stephen Leake
2003-01-21 18:49 ` Martin Krischik
2003-01-21 13:10 ` Victor Porton
2003-01-21 18:40 ` Victor Porton
2003-01-21 20:54 ` Victor Porton
-- strict thread matches above, loose matches on Subject: below --
2003-01-21 13:31 Grein, Christoph
2003-01-21 18:54 ` Randy Brukardt
2003-01-21 19:02 ` Georg Bauhaus
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox