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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,69431b06fe9a3239 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!l6g2000vbn.googlegroups.com!not-for-mail From: Lucretia Newsgroups: comp.lang.ada Subject: Re: How do I disable elaboration code on this Date: Sun, 10 Apr 2011 14:19:37 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <58bc4fb4-5f6a-48d6-9c98-0dde7ac619df@p16g2000vbo.googlegroups.com> <4da2176e$0$6977$9b4e6d93@newsspool4.arcor-online.net> NNTP-Posting-Host: 90.194.162.198 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1302470377 9402 127.0.0.1 (10 Apr 2011 21:19:37 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sun, 10 Apr 2011 21:19:37 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: l6g2000vbn.googlegroups.com; posting-host=90.194.162.198; posting-account=L2-UcQkAAAAfd_BqbeNHs3XeM0jTXloS User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.9.1.10) Gecko/20100623 Iceweasel/3.5.10 (like Firefox/3.5.10),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:19718 Date: 2011-04-10T14:19:37-07:00 List-Id: On Apr 10, 9:47=A0pm, Georg Bauhaus wrote: > pragma Restrictions (No_Elaboration_Code); > > with System; > > package ISR is > =A0 =A0 procedure Dummy; > =A0 =A0 pragma Convention (C, Dummy); > > private > =A0 =A0 type Cb is not null access procedure; > =A0 =A0 pragma Convention (C, Cb); > > =A0 =A0 type CbW is limited record > =A0 =A0 =A0 =A0C : Cb :=3D Dummy'Access; > =A0 =A0 end record; > =A0 =A0 type Vectors is array (1 .. 4) of CbW; > =A0 =A0 pragma Convention (C, Vectors); > > =A0 =A0 Addr : constant System.Address :=3D System'To_Address > =A0 =A0 =A0 =A0 =A0(16#0000_0000#); > > =A0 =A0 Vector : Vectors; > =A0 =A0 pragma Import (Ada, Vector); > =A0 =A0 for Vector'Address use Addr; > end ISR; But can you initialise the array with different routines? I'm betting not. In a real implementation, there will be a number of ISR's but some may point to the dummy one. Luke.