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,2cb6bf1d75f9146b X-Google-Attributes: gid103376,public From: stt@henning.camb.inmet.com (Tucker Taft) Subject: Re: Freezing points Date: 1996/02/18 Message-ID: #1/1 X-Deja-AN: 139915307 sender: news@inmet.camb.inmet.com (USENET news) x-nntp-posting-host: henning.camb.inmet.com references: organization: Intermetrics, Inc. newsgroups: comp.lang.ada Date: 1996-02-18T00:00:00+00:00 List-Id: Scott Leschke (leschkes@ferret.cig.mot.com) wrote: : Could somebody out there simply and clearly enumerate all the items that : constitute a freezing point for me. Although I admit RM95 13.14, Freezing Rules, is not my favorite part of the reference manual (big ), it does enumerate the freezing points, starting at paragraph 3: 1) The *end* of a declarative_part, protected_body, or declaration of a library package/generic package. 2) A *body* causes freezing of everything declared before it in the same declarative part. 3) Each name, expression, or range causes freezing when appearing within: a) generic instantation (including default actuals that are used implicitly) b) object_declaration (that is not a deferred constant) 4) A record extension freezes its parent type 5) A static expression causes freezing of its type, etc., where it occurs 6) A non-static expression causes freezing where it occurs, unless it is part of a default expression/name; defaults don't cause freezing until they are "used." : For example, from messing with GNAT it appears that a numeric subtype : definition with a range constraint constitutes a freezing point. : ... : I'm assume this is all perfectly correct from an LRM standpoint but the : freezing point stuff has me a bit confused. A range constraint contains two expressions (in general). Expressions cause freezing, unless they are non-static default expressions. Hence, a range constraint freezes the type of the range (see 13.14(12)).. : Scott Leschke..................................ph: 708-632-2786 : Motorola, Inc.................................fax: 708-632-3145 : Cellular Infrastructure Group...............email: leschkes@cig.mot.com -Tucker Taft stt@inmet.com http://www.inmet.com/~stt/ Intermetrics, Inc. Cambridge, MA USA