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,6009c73a58f787a0 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-01-11 11:40:37 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: dewar@gnat.com (Robert Dewar) Newsgroups: comp.lang.ada Subject: Re: How to avoid unreferenced objects (mutexes etc) Date: 11 Jan 2002 11:40:37 -0800 Organization: http://groups.google.com/ Message-ID: <5ee5b646.0201111140.48bf30e2@posting.google.com> References: <3c3ee8c8.105408250@News.CIS.DFN.DE> NNTP-Posting-Host: 205.232.38.14 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1010778037 25891 127.0.0.1 (11 Jan 2002 19:40:37 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 11 Jan 2002 19:40:37 GMT Xref: archiver1.google.com comp.lang.ada:18793 Date: 2002-01-11T19:40:37+00:00 List-Id: dmitry@elros.cbb-automation.de (Dmitry A. Kazakov) wrote in message news:<3c3ee8c8.105408250@News.CIS.DFN.DE>... > The problem is that the object Temp is never referenced. > The compiler > complains of that, but it is a minor problem. The > questions are In GNAT, we just introduced pragma Unreferenced (entity-name, entity-name, ....); specifically to deal with entities that are deliberately unreferenced. This pragma supresses unreferenced warnings for the entity, and gives an error if the entity is actually referenced. It provides useful documentation that the entity is really really intended to be there, and serves a purpose even though it is not specifically referenced.