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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,ae233931baf2d312 X-Google-Attributes: gid103376,public From: dewar@cs.nyu.edu (Robert Dewar) Subject: Re: Integer'Size < 32 ? Date: 1996/08/12 Message-ID: #1/1 X-Deja-AN: 173694356 references: <9608081258.AA02749@most> <4ulinr$a7q@wdl1.wdl.lmco.com> organization: Courant Institute of Mathematical Sciences newsgroups: comp.lang.ada Date: 1996-08-12T00:00:00+00:00 List-Id: Mark said "At minimum this is bad quality of implementation, for an Ada 95 compiler this appears to a compiler bug. Ada 95 basically used a duck* test for static expression and requires that they be evaluated at compile time even when they don't appear in a static context." Mark's description of the Ada 95 situation is both picturesque and accurate :-) By comparison in Ada 83, static expressions were only those that appeared in syntactic positions requiring static expressions, or perhaps more accurately, let us say that the exact evaluation rules applied only in such circumstances. It is quite unfair to say that what DEC did in Ada 83 was bad quality implementation. It was quite deliberate. When you are faced with an implementation dependent feature where you have the choice of accepting more or fewer valid programs, then you can take one of two attitudes: 1. Accept as much as possible: "Ada code everywhere will port easily to my compiler." 2. Accept as little as possible: "Ada code developed on my compiler will port easily to other compilers." Either goal is valid, and without adding zillions of switches to the compiler you cannot satisfy both (besides satisfying both may add unacceptable complexity to the compiler). One situation like this is the choice of elaboration orders. Some compilers are very friendly in choosing a "good" order of elaboration without the need for what really are required Elaborate pragmas. Fine, but in practice that encourages people to write implementation dependent non-portable programs and they have trouble when they port to other implementations. Intermetrics has, I believe a switch for this particular case, which seems like a good idea, basically the settings are choose a good order (one most likely to succeed), and choose a bad order (one most likely to fail).