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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,7e60c1d99ae3ffa1 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-09-15 06:31:32 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!news-feed1.de1.concert.net!fu-berlin.de!uni-berlin.de!b8748.pppool.DE!not-for-mail From: Dmitry A.Kazakov Newsgroups: comp.lang.ada Subject: Re: Announce: The Ultimate SI Units Cracker Date: Mon, 16 Sep 2002 03:35:41 +0200 Message-ID: References: <3D8203A1.6931201A@despammed.com> <3D83D31C.4050809@attbi.com> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: b8748.pppool.de (213.7.135.72) Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: fu-berlin.de 1032096690 2108603 213.7.135.72 (16 [77047]) User-Agent: KNode/0.4 Xref: archiver1.google.com comp.lang.ada:28980 Date: 2002-09-16T03:35:41+02:00 List-Id: Mark Biggar wrote: > Dmitry A.Kazakov wrote: >> Wes Groleau wrote: >> >>>I prefer to look at it as >>>"There's no rule to prevent a compiler vendor from .... >>> and no way to prevent a user from selecting that compiler." >> >> Is it absolutely true? I mean, ARM precisely defines what is "static" and >> what is not. So an expression involving static discriminants could be >> *formally* non-static, even if its outcome were known at compile-time. >> Thus such an outcome would be not allowed to appear where a static value >> is expected. > > Yes, the ARM precisely defines which expressions must be static, but > it also goes on the define a "duck test"* for all expressions that > says that even though the expression is not in a static context > if it only contains static values then it should be statically > evaulated at compile time. In addition, the optimization "as if" rule > allows a compiler to do all sorts of things like Wes wants. Right (*), but it is only a part of the problem. Even if an outcome is known, it may not appear in a static context. One cannot heal that without redefining the term "static" in ARM 4.9. * However I saw no compiler capable to do it even in such a straightforward case as dimensioned units. Neither GNAT nor Aonix does it. -- Regards, Dmitry Kazakov www.dmitry-kazakov.de