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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,114e43c851a0cefb X-Google-Attributes: gid103376,public From: Tucker Taft Subject: Re: Warning in generic instantiation Date: 1999/05/10 Message-ID: <37371869.AEEEA124@averstar.com>#1/1 X-Deja-AN: 476249052 Content-Transfer-Encoding: 7bit Sender: news@inmet.camb.inmet.com (USENET news) X-Nntp-Posting-Host: houdini.burl.averstar.com References: <3734BB9E.F51ED23B@xtra.co.nz> Content-Type: text/plain; charset=us-ascii Organization: AverStar (formerly Intermetrics) Burlington, MA USA Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 1999-05-10T00:00:00+00:00 List-Id: AG wrote: > > Could somebody comment on the following warning > I get from ObjectAda compiler (7.1.105) when trying > that: > > generic > size: positive; > type item is (<>); > procedure matcher; > > procedure matcher is > type set is array(0..size-1) of item; > type unit is record > what: set; -- *** 1 > end record; > begin > null; > end; > > with matcher; > procedure start is > type unit is (a, b, c); > size: positive; > begin > declare > procedure match is new matcher(size, unit); -- *** 2 > begin > null; > end; > end; > > The warning I get at line ***2 is: > > LRM:13.3(16),Object does not have a meaningful address, > returning a null address I believe this was due to a bug in the generation of debugging information. I believe the problem has been identified and fixed, though I don't know whether it has yet been released. You may safely ignore this warning. Robert Dewar correctly pointed out in his reply that "Size" is uninitialized. Here is the corresponding message you might receive from a newer Aonix compiler: example.ada: Warning: line 21 col 13 LRM:13.9.1(9), size is uninitialized (In instance of generic matcher at example.ada: line 21 col 34) > Thanks, > AG -- -Tucker Taft stt@averstar.com http://www.averstar.com/~stt/ Technical Director, Distributed IT Solutions (www.averstar.com/tools) AverStar (formerly Intermetrics, Inc.) Burlington, MA USA