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.1 required=5.0 tests=BAYES_00,FREEMAIL_FROM, FROM_STARTS_WITH_NUMS,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,c319c681003d3e4c X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1994-09-17 08:50:32 PST Path: bga.com!news.sprintlink.net!howland.reston.ans.net!europa.eng.gtefsd.com!paladin.american.edu!auvm!COMPUSERVE.COM!73672.2025 Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU Newsgroups: comp.lang.ada Message-ID: <940916030323_73672.2025_DHR67-3@CompuServe.COM> Date: Thu, 15 Sep 1994 23:03:24 EDT Sender: Ada programming language From: Ken Garlington <73672.2025@COMPUSERVE.COM> Subject: Re: Static in 9X Comments: To: "comp.lang.ada" Date: 1994-09-15T23:03:24-04:00 List-Id: Robert Dewar writes on Thu, 15 Sep 1994 09:37:32: << I don't see that an Ada vendor is particularly in the business of interpreting language rules like this >> Our vendor decides whether or not to put objects in ROM via the definition of static (in part). We're trying to get better performance in this area for composite objects. << What would be useful is for you to explain why you thought that the other cases were possibly covered >> Good question. I don't have the standard in front of me, so I'll have to rely on memory for some things. I think it says that a name which denotes a scalar object of a static type with a static value is static. What if the scalar is a record component? The discussion on static functions describes predefined functions which have static arguments. I thought maybe an instantiation of UNCHECKED_CONVERSION could possibly fit that definition, since UNCHECKED_CONVERSION is predefined. Most of it was just wishful thinking; that I might not have read something completely. Records such as: type MY_TYPE is record X : INTEGER; Y : INTEGER; end record; MY : constant MY_TYPE := (1,2); just seem so obviously static, in the general (non-Ada) sense of the term, that I thought there had to be something I'm missing. Similarly, when I look at a function like function ADD ( VALUE : INTEGER ) return INTEGER is begin return VALUE + 1; end; V : constant INTEGER := ADD(0); it seems like ADD(0) should be a static expression. I understand that "static" in the Ada sense probably wasn't meant to be related to ROMability, but that's where we are with the vendor at the moment. The question about type conversions is a little different. The vendor says that a type conversion that requires manipulation of the data representation can't be put in ROM. However, 9X seemed to me to define this as static in some cases. I just wanted to make sure I read it right.