From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,71d79ed4fdc42ae2 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!feeder3.cambriumusenet.nl!feed.tweaknews.nl!193.201.147.78.MISMATCH!feeder.news-service.com!85.214.198.2.MISMATCH!eternal-september.org!.POSTED!not-for-mail From: BrianG Newsgroups: comp.lang.ada Subject: Re: Make specific warning error with gnat? Date: Sat, 03 Jul 2010 22:22:19 -0400 Organization: A noiseless patient Spider Message-ID: References: <82mxuaxmb1.fsf@stephe-leake.org> <82aaq9xac8.fsf@stephe-leake.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Sun, 4 Jul 2010 02:19:22 +0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="vvBPJT09arwmd97Fw4UIhw"; logging-data="16269"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18GQku6x8SIrvg2dtcMnY1a" User-Agent: Thunderbird 2.0.0.24 (X11/20100317) In-Reply-To: <82aaq9xac8.fsf@stephe-leake.org> Cancel-Lock: sha1:QBLpoF729TceiayBhBo3EjnKsro= Xref: g2news2.google.com comp.lang.ada:13142 Date: 2010-07-03T22:22:19-04:00 List-Id: Stephen Leake wrote: > Markus Schoepflin writes: >> Am 02.07.2010 11:30, schrieb Stephen Leake: >>> Markus Schoepflin writes: >>> gnat is a very good compiler; the warnings it produces should be taken >>> seriously. >> I would love to, but I'm dealing with a multi-million LOC legacy code >> base of Ada 83 in maintenance mode, which produces quite a large >> number of warnings. >> >> I neither have the time nor the resources available to fix all of >> them, nor am I allowed to do so. > > I can understand not changing design in a maintenance situation, but > adding 'pragma Warnings (off)' in places ought to be ok. Still, it can > be a lot of work. > In many maintenance situations, _ANY_ source code change is an issue. The more files you change (in some situations the more lines you change), the greater the impact - on testing and on cost. Adding pragmas throughout the code may be as large an impact as a moderate-to-large redesign. Another GNAT warning I'd put in the same category is 'object XYZ is read but never written' (or something similar). I saw this recently for a record type (defined in a different location), where all components have default value ... except for one which was added recently.