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,b018778453c6e0e4 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "Alex R. Mosteo" Newsgroups: comp.lang.ada Subject: Re: Pragma Unreferenced in GNAT GPL 2008 Date: Tue, 08 Jul 2008 10:28:07 +0200 Message-ID: <6dgmokF2fhakU2@mid.individual.net> References: <6d8f0qF1c5qaU1@mid.individual.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: individual.net telSW5jj9zX3k+UX09NrsAjUY12e+1US6gDVvKqLSYcIxAZiI= Cancel-Lock: sha1:mkijmL18WqzdUtGBNgh9FR/01K0= User-Agent: KNode/0.10.9 Xref: g2news1.google.com comp.lang.ada:1035 Date: 2008-07-08T10:28:07+02:00 List-Id: Wilhelm Spickermann wrote: > After installing GNAT GPL 2008 I get unexpected warnings on > unreferenced variables: And I'm being warned that a variable is not referenced when it indeed is (and it's not a very cornerish case, although it is within a quite large hierarchy of objects). That seems the contrary, but maybe something has changed in that area of the compiler. > > ... > entry Wait (S : Event_State) when True is > begin > if S = On then > requeue Wait_On with abort; > else > requeue Wait_Off with abort; > end if; > end Wait; > > entry Wait_On (S : Event_State) when Value = On is > pragma Unreferenced (S); > begin > null; > end Wait_On; > ... > "pragma Unreferenced (S);" is honoured by GNAT GPL 2007 and seems > to be ignored by GNAT GPL 2008. > > Is this a compiler bug? > > Wilhelm Spickermann