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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,5bef5e9c5bedc675 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-01-02 17:12:32 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!small1.nntp.aus1.giganews.com!border3.nntp.aus1.giganews.com!intern1.nntp.aus1.giganews.com!nntp.giganews.com!nntp.comcast.com!news.comcast.com.POSTED!not-for-mail NNTP-Posting-Date: Fri, 02 Jan 2004 19:12:28 -0600 Date: Fri, 02 Jan 2004 20:12:28 -0500 From: "Robert I. Eachus" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: [No_Elaboration_Code] GNAT still generating rep_to_pos, why? References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: NNTP-Posting-Host: 24.34.214.193 X-Trace: sv3-tTpwEKxcOde3H/TgXk+k9WWl+Rfr03qYImbIZJYz0YPmsBMOiq58W22tMHSrk59sKpTi6z9y2mvfaXS!h3a+Wx5VbpWwEySL4rDGl8rm8S0yw/l2clO4HSNBfphRWdMnIp2JfVj4xhz1mA== X-Complaints-To: abuse@comcast.net X-DMCA-Complaints-To: dmca@comcast.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.1 Xref: archiver1.google.com comp.lang.ada:4053 Date: 2004-01-02T20:12:28-05:00 List-Id: Luke A. Guest wrote: > Although a kernel is not a *normal* program, Ada was designed to be > used in the embedded sector with or without an OS, so there must be a > solution as somebody must've needed to do what I'm wanting to do at some point. It depends on what you need done. I'm not sure, but from what you have posted it sounds like you have a data structure that has to be located at a particular location, and not be initialized by GNAT. pragma No_Run_Time will not do this. You need to use pragma Import if you don't want the access values to be set by default to null. This is not done by the run-time, it is done by the elaboration code for the unit where the imported object is declared, usually the main program. See RM B.1(24). This is one of those things which makes sense once you grok the whole--the only case where you don't want default initializations is where the initializations are explicitly performed by non-Ada code. But it is often the case that the object you need not to be default initialized when calling C code is a pointer, not the data itself. Sometimes you even need two pragma Imports for one object, one for a pointer, and one for the data object itself. -- Robert I. Eachus "The war on terror is a different kind of war, waged capture by capture, cell by cell, and victory by victory. Our security is assured by our perseverance and by our sure belief in the success of liberty." -- George W. Bush