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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,7f1e0b399cd01cb0 X-Google-Attributes: gid103376,public From: tmoran@bix.com (Tom Moran) Subject: Re: Unreferenced lock variables Date: 1999/04/20 Message-ID: <3718268c.48395643@news.pacbell.net>#1/1 X-Deja-AN: 468528022 References: <7ero31$n46$1@nnrp1.dejanews.com> <7esrmv$k1n$1@nnrp1.dejanews.com> <3713b417.22324981@news.pacbell.net> X-Complaints-To: abuse@pacbell.net X-Trace: typhoon-sf.pbi.net 924569203 206.170.2.195 (Mon, 19 Apr 1999 17:46:43 PDT) Organization: SBC Internet Services NNTP-Posting-Date: Mon, 19 Apr 1999 17:46:43 PDT Newsgroups: comp.lang.ada Date: 1999-04-20T00:00:00+00:00 List-Id: >>With regard to initialization and finalization, the ARG >>just agreed (unwisely if you ask me!) to allow a compiler >>to optimize away initialization and finalization for an >>otherwise unreferenced variable. >It seems such a bad idea - what arguments led them to this decision? Randy Brukardt was kind enough to educate me on some of the points here, including procedure Something(P : in integer) is Unused : integer := P/0; begin ... which can legally have Unused eliminated and thus the divide by zero eliminated. That certainly provides an analogous precedent for eliminating the controlled Initialize/Finalize. So with 'limited' still available when you really gotta have Initialize/Finalize, I guess it's not so unreasonable to eliminate the controlled object (in the non-limited) case after all.