From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.6 Path: eternal-september.org!reader02.eternal-september.org!aioe.org!yy9MKEJN2ULhWGfnfq4v5w.user.gioia.aioe.org.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: calling function but ignoring results Date: Sat, 03 Jul 2021 20:11:05 +0100 Organization: Aioe.org NNTP Server Message-ID: References: <69a59fdc-72bb-4202-99fc-d776530de653n@googlegroups.com> <58bbf3ca-6252-4543-a50e-0483181d1b37n@googlegroups.com> <9ce930a5-d63e-4985-8371-1fc2836b554an@googlegroups.com> NNTP-Posting-Host: yy9MKEJN2ULhWGfnfq4v5w.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain X-Complaints-To: abuse@aioe.org User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (darwin) Cancel-Lock: sha1:oFiZyyUAUTMAr/NcgOZiQs7lYJc= X-Notice: Filtered by postfilter v. 0.9.2 Xref: reader02.eternal-september.org comp.lang.ada:62327 List-Id: Gabriele Galeotti writes: > On Friday, July 2, 2021 at 9:32:24 AM UTC+2, amado...@gmail.com wrote: >> On Thursday, 1 July 2021 at 19:07:43 UTC+1, Gabriele Galeotti wrote: >> > But sometimes it is necessary... >> >> Yes, but the frequency is too low to justify yet another feature of >> the language, IMO. > > Note: in the last reply, I am referring to the use of pragma > Unreferenced, not a new language feature. or aspect Unreferenced, or if you're prepared to accept GNAT extensions anyway, just call the not-referenced variable Dummy, or Unused, or .. I listed the relevant variable names upthread. I suspect you _won't_ get a warning if you do reference a variable named Dummy, but at that point it should be pretty obvious that something's wrong. I think any compiler needs some facility like this, at least if it has any pretensions to interfacing to foreign languages; but it probably won't be the same as Ada's.