From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) 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.5-pre1 Date: 4 Jul 93 08:59:30 GMT From: nwnexus!emagnuso@uunet.uu.net (Erik Magnuson) Subject: Re: lint tool for Ada? Message-ID: <21665i$gis@nwfocus.wa.com> List-Id: In article helkenn@dale.cts.com (David Helken) writes : > Am I just using the wrong compiler? :-) > > David Maybe. Let's see now... 1. Unused objects - Rational will highlight all unused withs, declarations, and objects with a single key. - Alsys cross reference utility will also flag unused objects including enumeration literals. (Although it flags as unused named numbers that are used only to define other named numbers.) I'm sure other vendors xref utilities do as well. In general, this feature requires the units to be compiled (possibly with debugging or some other extra options) and some way to specify which units to consider. 2. Uninitialized variables - ICC (w/optimization) will warn about potential uninitialized variables 3. Dead code - Alsys and ICC both warn about dead code (when they eliminate it) I've traditionally included assessments of these features in my compiler evaluations. This is from memory for the last several compilers I worked with. I used to have a longer list but I'm sure it's out of date by now. (If anyone else wants to jump in with what compilers do what, I'd find it interesting.) Should providing these features be the job of the Ada compiler vendor? Pro: The compiler (and optimizer) often has to figure this out anyway. The compiler (or vendor) can take into account vendor specific stuff like pragmas. Con: The Ada vendors have a hard enough time getting good compilers out the door! Not all vendors will supply the same capabilities (IMHO support toolsets vary more than code quality.) -- Erik