comp.lang.ada
 help / color / mirror / Atom feed
* Remove un-necessary "with" and "use"
@ 2014-04-06 20:56 dontspam365
  2014-04-06 23:09 ` Jeffrey Carter
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: dontspam365 @ 2014-04-06 20:56 UTC (permalink / raw)


Hi! 
Is there a way to remove/get warning about "with" and possibly "use" that are not "contributing to the executable", via GPS 5.2.1 or possibly some of the GNAT tools?
Frank

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Remove un-necessary "with" and "use"
  2014-04-06 20:56 Remove un-necessary "with" and "use" dontspam365
@ 2014-04-06 23:09 ` Jeffrey Carter
  2014-04-07  6:23   ` Simon Wright
  2014-04-07  4:51 ` J-P. Rosen
  2014-04-07  6:21 ` Simon Wright
  2 siblings, 1 reply; 6+ messages in thread
From: Jeffrey Carter @ 2014-04-06 23:09 UTC (permalink / raw)


On 04/06/2014 01:56 PM, dontspam365@gmail.com wrote:
> Is there a way to remove/get warning about "with" and possibly "use" that are
> not "contributing to the executable", via GPS 5.2.1 or possibly some of the
> GNAT tools?

I suspect you'll find the answer in the secret GNAT documentation.

-gnatwall

enables all warnings, including any that relate to what you're looking for.

-- 
Jeff Carter
"I soiled my armor, I was so scared."
Monty Python & the Holy Grail
71

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Remove un-necessary "with" and "use"
  2014-04-06 20:56 Remove un-necessary "with" and "use" dontspam365
  2014-04-06 23:09 ` Jeffrey Carter
@ 2014-04-07  4:51 ` J-P. Rosen
  2014-04-07  6:21 ` Simon Wright
  2 siblings, 0 replies; 6+ messages in thread
From: J-P. Rosen @ 2014-04-07  4:51 UTC (permalink / raw)


Le 06/04/2014 22:56, dontspam365@gmail.com a écrit :
> Hi! Is there a way to remove/get warning about "with" and possibly
> "use" that are not "contributing to the executable", via GPS 5.2.1 or
> possibly some of the GNAT tools? Frank
> 
With AdaControl:
check unnecessary_use_clause;
check with_clauses (reduceable);

-- 
J-P. Rosen
Adalog
2 rue du Docteur Lombard, 92441 Issy-les-Moulineaux CEDEX
Tel: +33 1 45 29 21 52, Fax: +33 1 45 29 25 00
http://www.adalog.fr

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Remove un-necessary "with" and "use"
  2014-04-06 20:56 Remove un-necessary "with" and "use" dontspam365
  2014-04-06 23:09 ` Jeffrey Carter
  2014-04-07  4:51 ` J-P. Rosen
@ 2014-04-07  6:21 ` Simon Wright
  2014-04-07 21:08   ` dontspam365
  2 siblings, 1 reply; 6+ messages in thread
From: Simon Wright @ 2014-04-07  6:21 UTC (permalink / raw)


dontspam365@gmail.com writes:

> Is there a way to remove/get warning about "with" and possibly "use"
> that are not "contributing to the executable", via GPS 5.2.1 or
> possibly some of the GNAT tools?

If you want to get the warning so that you can remove (or move) the
"with"s, then -gnatwu will do the trick.

If you want most standard warnings, -gnatwa does it. If you want most
standard warnings but not unused "withs", use -gnatwaU.

Or you could say

   pragma Warnings (Off);
   with Unused_Package;
   pragma Warnings (On);

in the code.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Remove un-necessary "with" and "use"
  2014-04-06 23:09 ` Jeffrey Carter
@ 2014-04-07  6:23   ` Simon Wright
  0 siblings, 0 replies; 6+ messages in thread
From: Simon Wright @ 2014-04-07  6:23 UTC (permalink / raw)


Jeffrey Carter <spam.jrcarter.not@spam.not.acm.org> writes:

> -gnatwall

This enables standard warnings plus missing elaboration pragmas.

I used to say -gnatwaL, but I see that L is now the default.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Remove un-necessary "with" and "use"
  2014-04-07  6:21 ` Simon Wright
@ 2014-04-07 21:08   ` dontspam365
  0 siblings, 0 replies; 6+ messages in thread
From: dontspam365 @ 2014-04-07 21:08 UTC (permalink / raw)


Thank you for help. 



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-04-07 21:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-06 20:56 Remove un-necessary "with" and "use" dontspam365
2014-04-06 23:09 ` Jeffrey Carter
2014-04-07  6:23   ` Simon Wright
2014-04-07  4:51 ` J-P. Rosen
2014-04-07  6:21 ` Simon Wright
2014-04-07 21:08   ` dontspam365

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