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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,c840deaa6965e67a X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1995-02-01 04:25:37 PST Path: nntp.gmd.de!Germany.EU.net!howland.reston.ans.net!gatech!newsxfer.itd.umich.edu!zip.eecs.umich.edu!panix!cmcl2!thecourier.cims.nyu.edu!thecourier.cims.nyu.edu!nobody From: dewar@cs.nyu.edu (Robert Dewar) Newsgroups: comp.lang.ada Subject: Re: Memory overwrite? Date: 1 Feb 1995 07:25:37 -0500 Organization: Courant Institute of Mathematical Sciences Message-ID: <3gnuk1$8eu@gnat.cs.nyu.edu> References: <3g2stg$i0u@miranda.gmrc.gecm.com> <3gj69v$1he@theopolis.orl.mmc.com> NNTP-Posting-Host: gnat.cs.nyu.edu Date: 1995-02-01T07:25:37-05:00 List-Id: T.E.D. says that all four Ada compilers he has used generate warnings if uninitialized variables are passed as in parameters. Just so that no one gets confused, it is *impossible* to generate such warnings in all cases (to do so would require: (a) telepathy on the part of the compiler to guess the input in advance (b) a solution to the halting problem otherwise, no sweat :-) Of course warnings can be generated in some simple cases. But it is not the case that worrying about the semantic effects of uninitialized variables is unimportant because warnings can be generated. Some obvious examples where the compiler cannot check is for the case of array elements, references to dynamically allocated values (x.all), and global variables where the compiler cannot tell who might have initialized them. So T.E.D. is I am afraid operating from a sense of false security (it is in fact one disadvantage of the generation of such error messages, it sometimes lulls people into this sense of false security). It is true that the warnings are very useful, but don't depend on them!