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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,ec4a7355f321a22b X-Google-Attributes: gid103376,public Path: controlnews3.google.com!news1.google.com!news.glorb.com!newsfeed.stueberl.de!newsr1.ipcore.viaginterkom.de!news-peer1!btnet-feed3!newreader.ukcore.bt.net!btnet-feed5!btnet!news.btopenworld.com!not-for-mail From: "Martin Dowie" Newsgroups: comp.lang.ada Subject: Re: Task discriminants Date: Tue, 25 May 2004 05:48:28 +0000 (UTC) Organization: BT Openworld Message-ID: References: <40ACC50E.9040406@mail.usyd.edu.au> <40adcdfe_1@baen1673807.greenlnk.net> NNTP-Posting-Host: host81-152-56-112.range81-152.btcentralplus.com X-Trace: sparta.btinternet.com 1085464108 22365 81.152.56.112 (25 May 2004 05:48:28 GMT) X-Complaints-To: news-complaints@lists.btinternet.com NNTP-Posting-Date: Tue, 25 May 2004 05:48:28 +0000 (UTC) X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MSMail-Priority: Normal X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 Xref: controlnews3.google.com comp.lang.ada:812 Date: 2004-05-25T05:48:28+00:00 List-Id: "Randy Brukardt" wrote in message news:vpGdnbX1YZHq9y_d4p2dnA@megapath.net... > > Is there any compiler out that that does not do the 'right thing' - I've > certainly never come across one. > > How would you know? Depending on side-effects in elaboration order is > dubious in any case. The only place I've ever seen discriminants initialized > by functions with side-effects is in ACATS tests - it's certainly not a > common style. And, the issue is one of optimization - an implementation > could implement elaboration in unrolled loops or the like in some cases. Spotting when it does do the 'right' thing would be easy during any half decent testing as the whole point of this is to ensure that the array index into the task is the same as value as the discriminant. As to whether the style is common, well, YMMV. :-) > Just because it works in some particular case doesn't mean that it will work > in all cases. Absolutely! But that was kind of my question - is there any implementation that won't give the desired result in this case? Not to my knowledge but then I don't have access to every implementation... -- Martin