From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Date: 24 Oct 92 18:44:23 GMT From: alex@MIMSY.CS.UMD.EDU (Alex Blakemore) Subject: Re: Uninitialized subtype variables Message-ID: <61435@mimsy.umd.edu> List-Id: In article eachus@Dr_No.mitre.org (Rober t I. Eachus) writes: > One slight addition to Tucker's list. Another alternative that a > compiler can take is to choose to initialize the variable instead of > doing the check. 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. -- --------------------------------------------------- Alex Blakemore alex@cs.umd.edu NeXT mail accepted