comp.lang.ada
 help / color / mirror / Atom feed
* Redundant With Remover
@ 1998-01-30  0:00 spoons
  1998-01-31  0:00 ` Mats Weber
  0 siblings, 1 reply; 8+ messages in thread
From: spoons @ 1998-01-30  0:00 UTC (permalink / raw)



Does anybody know of a utility that can check for unneccessary with'd
packages? Obviously it would be harder to spot for packages that are also
use'd, but if the utility also looks at the with'd package to see if
anything is actually used, it could be done.

Thanks in advance.

Trying to clean up some old code,
JD

-------------------==== Posted via Deja News ====-----------------------
      http://www.dejanews.com/     Search, Read, Post to Usenet




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

* Re: Redundant With Remover
  1998-01-30  0:00 Redundant With Remover spoons
@ 1998-01-31  0:00 ` Mats Weber
  1998-01-31  0:00   ` Nick Roberts
                     ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Mats Weber @ 1998-01-31  0:00 UTC (permalink / raw)



> Does anybody know of a utility that can check for unneccessary with'd
> packages? Obviously it would be harder to spot for packages that are also
> use'd, but if the utility also looks at the with'd package to see if
> anything is actually used, it could be done.

gnatf (part of the GNAT compiler) does that.




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

* Re: Redundant With Remover
  1998-01-31  0:00 ` Mats Weber
@ 1998-01-31  0:00   ` Nick Roberts
  1998-02-01  0:00   ` wiljan
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 8+ messages in thread
From: Nick Roberts @ 1998-01-31  0:00 UTC (permalink / raw)



I was just going to say that a decent compiler ought to report that sort of
thing as a warning (no?).

-- 

== Nick Roberts ================================================
== Croydon, UK                       ===========================
==                                              ================
== Proprietor, ThoughtWing Software                   ==========
== Independent Software Development Consultant            ======
== Nick.Roberts@dial.pipex.com                              ====
== Voicemail & Fax +44 181-405 1124                          ===
==                                                            ==
==           I live not in myself, but I become               ==
===          Portion of that around me; and to me             ==
====         High mountains are a feeling, but the hum        ==
=======      Of human cities torture.
===========                             -- Byron [Childe Harold]


Mats Weber <Mats.Weber@elca-matrix.ch> wrote in article
<34D32B8E.F86335E1@elca-matrix.ch>...
> > Does anybody know of a utility that can check for unneccessary with'd
> > packages? Obviously it would be harder to spot for packages that are
also
> > use'd, but if the utility also looks at the with'd package to see if
> > anything is actually used, it could be done.
> 
> gnatf (part of the GNAT compiler) does that.





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

* Re: Redundant With Remover
  1998-01-31  0:00 ` Mats Weber
  1998-01-31  0:00   ` Nick Roberts
  1998-02-01  0:00   ` wiljan
@ 1998-02-01  0:00   ` Robert S. White
  1998-02-03  0:00   ` spoons
  3 siblings, 0 replies; 8+ messages in thread
From: Robert S. White @ 1998-02-01  0:00 UTC (permalink / raw)



In article <34D32B8E.F86335E1@elca-matrix.ch>, Mats.Weber@elca-matrix.ch 
says...
>
>> Does anybody know of a utility that can check for unneccessary with'd
>> packages? Obviously it would be harder to spot for packages that are also
>> use'd, but if the utility also looks at the with'd package to see if
>> anything is actually used, it could be done.
>
>gnatf (part of the GNAT compiler) does that.

  Rational APEX will also when you hit the "Show Unused" button.
_____________________________________________________________________
Robert S. White         -- An embedded systems software engineer
e-mail reply to reverse of ( add .'s ):  net mcleodusa shift2 r white





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

* Re: Redundant With Remover
  1998-01-31  0:00 ` Mats Weber
  1998-01-31  0:00   ` Nick Roberts
@ 1998-02-01  0:00   ` wiljan
  1998-02-01  0:00   ` Robert S. White
  1998-02-03  0:00   ` spoons
  3 siblings, 0 replies; 8+ messages in thread
From: wiljan @ 1998-02-01  0:00 UTC (permalink / raw)



Mats Weber <Mats.Weber@elca-matrix.ch> wrote in article
<34D32B8E.F86335E1@elca-matrix.ch>...
> > Does anybody know of a utility that can check for unneccessary with'd
> > packages? Obviously it would be harder to spot for packages that are
also
> > use'd, but if the utility also looks at the with'd package to see if
> > anything is actually used, it could be done.
> 
> gnatf (part of the GNAT compiler) does that.
>
Yes you can do this with gnatf -x1
It sometimes reports that with clauses are not needed incorrectly however.





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

* Re: Redundant With Remover
  1998-01-31  0:00 ` Mats Weber
                     ` (2 preceding siblings ...)
  1998-02-01  0:00   ` Robert S. White
@ 1998-02-03  0:00   ` spoons
  1998-02-03  0:00     ` Robert Dewar
  3 siblings, 1 reply; 8+ messages in thread
From: spoons @ 1998-02-03  0:00 UTC (permalink / raw)



In article <34D32B8E.F86335E1@elca-matrix.ch>,
  Mats.Weber@elca-matrix.ch wrote:
>
> > Does anybody know of a utility that can check for unnecessary with'd
> > packages? Obviously it would be harder to spot for packages that are also
> > use'd, but if the utility also looks at the with'd package to see if
> > anything is actually used, it could be done.
>
> gnatf (part of the GNAT compiler) does that.

I've been trying to use gnatf, but it doesn't get very far.  It keeps on
failing at various packages saying they aren't predefined, yet as far as
I know, they are: unchecked_deallocation, calendar, system, etc.  Anyway
to specify which packages it should ignore as being 'predefined'?

JD

-------------------==== Posted via Deja News ====-----------------------
      http://www.dejanews.com/     Search, Read, Post to Usenet




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

* Re: Redundant With Remover
  1998-02-03  0:00   ` spoons
@ 1998-02-03  0:00     ` Robert Dewar
  1998-02-16  0:00       ` Oliver.Kellogg
  0 siblings, 1 reply; 8+ messages in thread
From: Robert Dewar @ 1998-02-03  0:00 UTC (permalink / raw)



JD asks

<<I've been trying to use gnatf, but it doesn't get very far.  It keeps on
failing at various packages saying they aren't predefined, yet as far as
I know, they are: unchecked_deallocation, calendar, system, etc.  Anyway
to specify which packages it should ignore as being 'predefined'?
>>

Sounds like some kind of usage error. We certainly use gnatf all the
time on the GNAT sources for finding unused withs. Actually an
improvement planned for the near future is to integrate this processing
into the compiler so that it is automatic.





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

* Re: Redundant With Remover
  1998-02-03  0:00     ` Robert Dewar
@ 1998-02-16  0:00       ` Oliver.Kellogg
  0 siblings, 0 replies; 8+ messages in thread
From: Oliver.Kellogg @ 1998-02-16  0:00 UTC (permalink / raw)



For finding whether the same unit is withed more than once in an
Ada unit, you can also use the verbose flat mode of withlist.pl,

http://sw-eng.falls-church.va.us/AdaIC/tools/withlist/withlist-pl.txt

This is just a side note and does not really answer the original poster's
question of finding whether a single "with" is necessary or not.

--Oliver

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/   Now offering spam-free web-based newsreading




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

end of thread, other threads:[~1998-02-16  0:00 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-01-30  0:00 Redundant With Remover spoons
1998-01-31  0:00 ` Mats Weber
1998-01-31  0:00   ` Nick Roberts
1998-02-01  0:00   ` wiljan
1998-02-01  0:00   ` Robert S. White
1998-02-03  0:00   ` spoons
1998-02-03  0:00     ` Robert Dewar
1998-02-16  0:00       ` Oliver.Kellogg

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