comp.lang.ada
 help / color / mirror / Atom feed
From: eachus@mitre-bedford.arpa  (Robert I. Eachus)
Subject: Re: Uninitialized subtype variables
Date: 27 Oct 92 01:26:58 GMT	[thread overview]
Message-ID: <EACHUS.92Oct26202658@Dr_No.mitre.org> (raw)

In article <61435@mimsy.umd.edu> alex@cs.umd.edu (Alex Blakemore) writes:

   though this is a nice trick, it hurts portability.

   an erroneous program could pass through rigorous testing without a hint of
   the inherent problems.  They could then show up seemingly in random
   places in another compiler.  At least, without this trick there is a decent
   chance you will find the error - with or without optimizing the checks away.

   even though this is allowed by Ada83.  I would prefer the compiler
   did not initialze variables that I did not initialize.

   It would be nice as a compilation option to choose between allowing
   the optimizer to assume all variables were in range (fast code) and
   disallowing check removal which could depend on unitialized
   variable being in range (safe code).  This is not the same as
   suppressing all checks.

   Hmmm!  The compiler we did this on notified the user in a warning
message.  I used to go through them religiously and find the ones
where I goofed, and the ones where the compiler goofed (couldn't
figure out that all paths were safe even with sufficient information).
The latter category shrank quickly, and the remainder--it was okay but
the compiler didn't have the information to know--accounted for less
than 30% of the uninitialized scalar variable warnings.

--

					Robert I. Eachus

with Standard_Disclaimer;
use  Standard_Disclaimer;
function Message (Text: in Clever_Ideas) return Better_Ideas is...

             reply	other threads:[~1992-10-27  1:26 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1992-10-27  1:26 Robert I. Eachus [this message]
  -- strict thread matches above, loose matches on Subject: below --
1992-10-27  1:22 Uninitialized subtype variables munnari.oz.au!ariel!ucsvc.ucs.unimelb.edu.au!phillip.edu.au!dale
1992-10-25 11:37 math.fu-berlin.de!news.netmbx.de!Germany.EU.net!mcsun!sunic!seunet!enea!s
1992-10-24 18:44 Alex Blakemore
1992-10-23 20:43 Michael Feldman
1992-10-23 16:49 cis.ohio-state.edu!news.sei.cmu.edu!ajpo.sei.cmu.edu!falis
1992-10-22 17:38 bloom-picayune.mit.edu!enterpoop.mit.edu!snorkelwacker.mit.edu!tamsun.tam
1992-10-22 13:46 cis.ohio-state.edu!zaphod.mps.ohio-state.edu!wupost!micro-heart-of-gold.m
1992-10-21 23:47 Richard Pattis
replies disabled

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