comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@cs.nyu.edu (Robert Dewar)
Subject: Re: Memory overwrite?
Date: 1 Feb 1995 07:25:37 -0500
Date: 1995-02-01T07:25:37-05:00	[thread overview]
Message-ID: <3gnuk1$8eu@gnat.cs.nyu.edu> (raw)
In-Reply-To: 3gj69v$1he@theopolis.orl.mmc.com

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!




  reply	other threads:[~1995-02-01 12:25 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1995-01-24 12:47 Memory overwrite? R.A.L Williams
1995-01-25 16:31 ` Robert A Duff
1995-01-25 19:01 ` Tucker Taft
1995-01-25 21:24 ` Robert Dewar
1995-01-30 17:06 ` Theodore E. Dennison
1995-02-01 12:25   ` Robert Dewar [this message]
  -- strict thread matches above, loose matches on Subject: below --
1995-01-26 13:05 R.A.L Williams
1995-01-27 14:01 ` Robert A Duff
1995-01-28 22:49   ` Robert Dewar
1995-01-30 14:16     ` Robert A Duff
1995-02-01 23:00       ` Matt Kennel
1995-01-28  5:54 ` Robert Dewar
1995-01-13  8:35 Rick Wouters
     [not found] ` <3fe5cp$fnq@theopolis.orl.mmc.com>
1995-01-18 18:20   ` Mark A Biggar
1995-01-20  5:19     ` Robert Dewar
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox