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=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,a675ccaa95a081a3,start X-Google-Attributes: gid103376,public From: dewar@merv.cs.nyu.edu (Robert Dewar) Subject: Re: Finding out parameters which are not written Date: 1997/08/27 Message-ID: #1/1 X-Deja-AN: 268653960 Organization: New York University Newsgroups: comp.lang.ada Date: 1997-08-27T00:00:00+00:00 List-Id: >Gerhard Radatz writes: << Does anyone know about a tool which can detect such situations as the following: procedure xxx (result: out INTEGER) is begin if <> then result := 0; end if; end; Obviously, this proc is erroneous and result will not be written if <> is FALSE. However, my Ada-Compiler (DEC-ADA for VMS) does not detect this problem, because result is written "at least once" in the body of xxx. Is there any tool which can provide help ??? >> Using the standard version of GNAT with -Wuninitialized and -O2, we get xxx.adb: In function `xxx': xxx.adb:1: warning: `result' might be used uninitialized in this function Not very localized, but better than not getting a warning at all!