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.6 required=5.0 tests=BAYES_40,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,7f05427bb0c4b47a,start X-Google-Attributes: gid103376,public From: "W. Wesley Groleau (Wes)" Subject: Re: Uninitialized out parameters Date: 1996/07/29 Message-ID: <9607291409.AA04616@most>#1/1 X-Deja-AN: 171074584 sender: Ada programming language comments: To: info-ada%listserv.nodak.edu@emcee.com mailer: Elm [revision: 70.85] newsgroups: comp.lang.ada Date: 1996-07-29T00:00:00+00:00 List-Id: Bob Duff pointed out that in Ada, OFTEN the compiler cannot tell whether a variable has been initialized and suggested that giving warnings in these cases are a big pain. (They're worse than a pain if they induce programmers to turn off all warnings.) Sometimes, the only reason the compiler can't tell is due to separate compilation. Another thread has already beat to death the reason why this is not true of GNAT. If you're not using gnat, independent tools do exist that can change the "unknown" to "correct" or "wrong" in many cases. How about having a compiler make an optional SINGLE warning for each invokation something like: COMPILER WAS UNABLE TO DETERMINE WHETHER THE FOLLOWING ITEMS WERE INITIALIZED BEFORE BEING REFERENCED: Identifier File Line No. ---------------------------- ---------------------------------- -------- PKG.PROC.PROC.VRBL.FIELD some_ada_source_file.ada 65,736 ..... Yes, go ahead and use this example to justify putting thousands of lines in a source file. NOT! :-) --------------------------------------------------------------------------- W. Wesley Groleau (Wes) Office: 219-429-4923 Magnavox - Mail Stop 10-40 Home: 219-471-7206 Fort Wayne, IN 46808 elm (Unix): wwgrol@pseserv3.fw.hac.com ---------------------------------------------------------------------------