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-7-bit X-Google-Thread: 103376,23ade4b42d9cb5f0 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-01-20 07:00:06 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!syros.belnet.be!news.belnet.be!fr.usenet-edu.net!usenet-edu.net!oleane.net!oleane!nnrp.oleane.net!not-for-mail From: Damien CARBONNE Newsgroups: comp.lang.ada Subject: Re: Eliminating copying in Gnat Date: Mon, 20 Jan 2003 15:57:08 +0100 Organization: Guest of France Telecom Oleane's newsreading service Message-ID: <3E2C0E44.481AC15B@dassault-aviation.fr> References: <3e2b7777$0$33930$bed64819@news.gradwell.net> NNTP-Posting-Host: out.dassault-aviation.fr Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: s1.read.news.oleane.net 1043074540 881 62.161.178.178 (20 Jan 2003 14:55:40 GMT) X-Complaints-To: abuse@oleane.net NNTP-Posting-Date: Mon, 20 Jan 2003 14:55:40 +0000 (UTC) X-Mailer: Mozilla 4.7 [en] (WinNT; U) X-Accept-Language: en Xref: archiver1.google.com comp.lang.ada:33239 Date: 2003-01-20T15:57:08+01:00 List-Id: 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; 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;