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,227f28d340d60167 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!fu-berlin.de!uni-berlin.de!not-for-mail From: "Alex R. Mosteo" Newsgroups: comp.lang.ada Subject: Re: Turning off "Unit xxx not referenced" warnings? Date: Tue, 02 Nov 2004 10:21:13 +0100 Message-ID: <41875189.1000203@mailinator.com> References: <1099043512.777330.230800@f14g2000cwb.googlegroups.com> <41821fdb$1_1@baen1673807.greenlnk.net> <2uf20fF2au91oU1@uni-berlin.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de +nnQ6YTRZZZ9g8+VHAlsqAGgOrWb/PcP9BvlW7l2dUgS1kgd4= User-Agent: Mozilla Thunderbird 0.8 (X11/20040913) X-Accept-Language: en-us, en In-Reply-To: Xref: g2news1.google.com comp.lang.ada:5963 Date: 2004-11-02T10:21:13+01:00 List-Id: Simon Wright wrote: > "Martin Dowie" writes: > > >>"Nick Roberts" wrote in message >>news:2uf20fF2au91oU1@uni-berlin.de... >> >>>>For GNAT, >>>> >>>>pragma Warnings (Off, ); >>>> >>>>see section "1. Implementation Defined Pragmas" of the GNAT Reference >>>>Manual. >>> >>>Also see pragma Unreferenced ibid. >> >>Yes, I've noticed that newer code coming out of ACT uses "Warnings (Off" >>rather than "Unreferenced" - no idea why... > > > I thought Unreferenced (X) was newer than Warnings (Off, X)? > > The good thing about Unreferenced is that you get a warning if you do > access the thing. > > The slightly confusing thing is that it sort-of means "read": eg, > declaring a BC lock, which locks during elaboration, > > L : Lock (Some_Semaphore'Access); > pragma Unreferenced (L); But Unreferenced doesn't work for packages, I tried it... maybe that's the reason for using Warnings.