comp.lang.ada
 help / color / mirror / Atom feed
From: Dmitry A.Kazakov <mailbox@dmitry-kazakov.de>
Subject: Re: Announce: The Ultimate SI Units Cracker
Date: Mon, 16 Sep 2002 03:35:41 +0200
Date: 2002-09-16T03:35:41+02:00	[thread overview]
Message-ID: <am223i$20b5r$1@ID-77047.news.dfncis.de> (raw)
In-Reply-To: 3D83D31C.4050809@attbi.com

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




  reply	other threads:[~2002-09-16  1:35 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-12  8:11 Announce: The Ultimate SI Units Cracker Grein, Christoph
2002-09-12 10:14 ` Preben Randhol
2002-09-12 10:50 ` Jeffrey Creem
2002-09-12 14:06 ` Wes Groleau
2002-09-12 17:06   ` Randy Brukardt
2002-09-13 15:20     ` Wes Groleau
2002-09-13 20:54       ` Randy Brukardt
2002-09-13 22:09   ` Dmitry A.Kazakov
2002-09-13 15:26     ` Wes Groleau
2002-09-15  6:21       ` Dmitry A.Kazakov
2002-09-15  0:24         ` Mark Biggar
2002-09-16  1:35           ` Dmitry A.Kazakov [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-09-12 11:51 Grein, Christoph
2002-09-12 11:59 Grein, Christoph
2002-09-13  4:53 Grein, Christoph
2002-09-13 14:34 ` Ira Baxter
2002-09-13 20:50   ` Stephen Leake
2002-09-16 10:22   ` Fraser Wilson
2002-09-13 15:41 ` Wes Groleau
2002-09-13  5:34 Grein, Christoph
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox