comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pushface.org>
Subject: Re: calling function but ignoring results
Date: Wed, 30 Jun 2021 20:31:05 +0100	[thread overview]
Message-ID: <lyzgv7kv46.fsf@pushface.org> (raw)
In-Reply-To: sbhgth$r7a$1@gioia.aioe.org

"Luke A. Guest" <laguest@archeia.com> writes:

> declare
>    Dont_Care : constant Boolean := foo (x, y); -- Uppercase is so pascal!
>    pragma Unused (Dont_Care); -- GNAT specific
> begin
>    null;
> end;

There are several names that you don't need pragma Unreferenced (not
Unused) for - see
https://docs.adacore.com/live/wave/gnat_rm/html/gnat_rm/gnat_rm/implementation_defined_pragmas.html#pragma-unreferenced

   "For the variable case, warnings are never given for unreferenced
   variables whose name contains one of the substrings DISCARD, DUMMY,
   IGNORE, JUNK, UNUSED in any casing. Such names are typically to be
   used in cases where such warnings are expected. Thus it is never
   necessary to use pragma Unreferenced for such variables, though it is
   harmless to do so."

  reply	other threads:[~2021-06-30 19:31 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-29 19:25 calling function but ignoring results Matt Borchers
2021-06-29 19:52 ` Jeffrey R. Carter
2021-06-29 20:34   ` Dmitry A. Kazakov
2021-06-30  6:06     ` Randy Brukardt
2021-07-09 18:14       ` G.B.
2021-07-09 19:20         ` Niklas Holsti
2021-07-10  2:57           ` Randy Brukardt
2021-07-12 15:56         ` Shark8
2021-06-30 10:17   ` Luke A. Guest
2021-07-01 18:07   ` Gabriele Galeotti
2021-07-02  7:32     ` Marius Amado-Alves
2021-07-03 11:35       ` Gabriele Galeotti
2021-07-03 11:46       ` Gabriele Galeotti
2021-07-03 19:11         ` Simon Wright
2021-07-04  7:22           ` Simon Wright
2021-07-06 23:07           ` Randy Brukardt
2021-06-30 10:26 ` Luke A. Guest
2021-06-30 19:31   ` Simon Wright [this message]
2021-06-30 23:06   ` Rod Kay
2021-07-01  0:06 ` Stephen Leake
2021-07-01  3:55   ` Randy Brukardt
2021-07-03 10:42     ` Stephen Leake
2021-07-03  1:22 ` Nasser M. Abbasi
2021-07-03  4:59   ` Matt Borchers
2021-07-03  7:37     ` Gautier write-only address
2021-07-03  7:42       ` Gautier write-only address
2021-07-03  7:57       ` Niklas Holsti
2021-07-03  7:46   ` Gautier write-only address
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox