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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,54889de51045a215 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-10-30 15:21:19 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!wn14feed!wn13feed!wn11feed!worldnet.att.net!204.127.198.203!attbi_feed3!attbi.com!attbi_s54.POSTED!not-for-mail Message-ID: <3FA19CE5.8000107@comcast.net> From: "Robert I. Eachus" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.2) Gecko/20021120 Netscape/7.01 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: ARG process (was += in ada) References: <3F7316F7.219F@mail.ru> <49cbf610.0310070205.2937e71a@posting.google.com> <3F896BAB.6040804@comcast.net> <3F89F4E9.7050601@comcast.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 24.34.214.193 X-Complaints-To: abuse@comcast.net X-Trace: attbi_s54 1067556078 24.34.214.193 (Thu, 30 Oct 2003 23:21:18 GMT) NNTP-Posting-Date: Thu, 30 Oct 2003 23:21:18 GMT Organization: Comcast Online Date: Thu, 30 Oct 2003 23:21:18 GMT Xref: archiver1.google.com comp.lang.ada:1860 Date: 2003-10-30T23:21:18+00:00 List-Id: Randy Brukardt wrote: > I can't say in general, but since my watch began (1998), the record is > AI95-00147. It was approved at meetings 4 times; the first three, new issues > surfaced afterwards, causing it to go back. It took six years to finish. I can't say for sure, but in Ada 83 it was probably AI-2,7,50 or AI-315. Of course, AI-315 probably holds a different record. I don't think we EVER got as far as an approved AI. AI-315 was about exceptions and optimization. The horrible example case was: X,Y: Integer; declare Junk: Integer; begin Get(X); Get(Y); Junk := X * Y; exception when Constraint_Error => Do_Something; end; The goal of course, is to determine if X*Y > Integer'Last. But 11.6 allowed the multiplication and the (potential) exception to be removed. The problem is fixed in Ada 95. The "effect" of a program is defined, rather than allowing a compiler to decide to eliminate code because a particular value is not used. Of course, in Ada 83 there was no real need to "fix" the language as long as no compiler tried to get too agressive in eliminating dead code. Since all compiler vendors were aware of the problem, they tended to avoid that particular optimization. Yes, dead code elimination is important in a good optimizer. But the optimizer and code generator can check if a variable is a compiler generated temporary or a user declared variable. Eliminating user declared variables entirely (and the constraint checks on its value) was the potentially upsetting case, eliminating compiler generated temporaries was not a problem. -- Robert I. Eachus "Quality is the Buddha. Quality is scientific reality. Quality is the goal of Art. It remains to work these concepts into a practical, down-to-earth context, and for this there is nothing more practical or down-to-earth than what I have been talking about all along...the repair of an old motorcycle." -- from Zen and the Art of Motorcycle Maintenance by Robert Pirsig