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,f92fbb4a0420dd57 X-Google-Attributes: gid103376,public From: dewar@cs.nyu.edu (Robert Dewar) Subject: Re: some questions re. Ada/GNAT from a C++/GCC user Date: 1996/04/02 Message-ID: #1/1 X-Deja-AN: 145422360 references: <4je9ju$174r@watnews1.watson.ibm.com> <4jhe1v$m0g@dayuc.dayton.saic.com> <4jp17p$17vn@watnews1.watson.ibm.com> <3160B03B.5230@mcs.com> organization: Courant Institute of Mathematical Sciences newsgroups: comp.lang.ada Date: 1996-04-02T00:00:00+00:00 List-Id: Mike said "I'm confused. I thought I read an explicit rule (in Barne's book) that no order of evaluation was specified for declarations." You are *indeed* seriously confused. Declarations in Ada are elaborated strictly in order, and John Barnes certainly did not say anything that corresponds to your memory. In fact the serial elaboration of declarations (conciously copied by the way from Algol-68) is one of the key design points in Ada. Note of course that whenever we say something is done strictly in order, we are talking about the formal semantic description, excluding RM 11.6. There are two respects in which this description may not correspond to the generated code. 1. THe compiiler is always allowed to shuffle things around if no Ada program can see any effect (using the formally defned meaning of external effect) of the change. 2. 11.6 allows certain chnges in the semantics of raising of predefined exceptions. of course this is relevant only if a declaration raises an exception.