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,df40d0d1975a16a6 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-06-13 05:47:01 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!uninett.no!ntnu.no!not-for-mail From: Preben Randhol Newsgroups: comp.lang.ada Subject: Re: Optimizing Boundary Checks Date: Fri, 13 Jun 2003 12:47:01 +0000 (UTC) Organization: Norwegian university of science and technology Message-ID: References: <20030613140324.0000372e._elh_@_terma_._com_> NNTP-Posting-Host: kiuk0152.chembio.ntnu.no X-Trace: tyfon.itea.ntnu.no 1055508421 11284 129.241.83.78 (13 Jun 2003 12:47:01 GMT) X-Complaints-To: usenet@itea.ntnu.no NNTP-Posting-Date: Fri, 13 Jun 2003 12:47:01 +0000 (UTC) User-Agent: slrn/0.9.7.4 (Linux) Xref: archiver1.google.com comp.lang.ada:39103 Date: 2003-06-13T12:47:01+00:00 List-Id: Vinzent Hoefler wrote: > > Well, the compiler *could* see that the type Index_Range always > satisfies the same constraint as for the array. I don't know for sure, > but I'd think, it does, because somehow it must store the constraints > for any type anyway and I strongly doubt that an optimizer would work > on type names instead of actual numbers describing their constraints. For the second example I was thinking that the Index_Range was not defined at all. > OTOH, I think, using such unnamed indices is a quite bad idea anyway, > because it breaks the type safety. So simply: Don't do it. :-) Sure. :-) -- Preben Randhol http://www.pvv.org/~randhol/