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,baa6871d466e5af9 X-Google-Attributes: gid103376,public From: dewar@merv.cs.nyu.edu (Robert Dewar) Subject: Re: AQ&S Guidance on pragma Elaborate_Body Date: 1997/04/27 Message-ID: #1/1 X-Deja-AN: 237699757 References: <528878564wnr@diphi.demon.co.uk> <336089AF.6046@elca-matrix.ch> Organization: New York University Newsgroups: comp.lang.ada Date: 1997-04-27T00:00:00+00:00 List-Id: Mats says <<...which shows that automatic elaboration order construction is _state of the art_ (this is further confirmed by other compilers (Verdix, DEC) I use without a single pragma Elaborate* and without ever getting Program_Error). IMO, state of the art belongs in the standard, not in nice compiler specific features, which would have allowed the standard to take a different approach: automatic elaboration order consturction with pragmas to _override_ it, instead of pragmas to do the right thing in the most basic cases.>> Please don't generalize from your experience -- this could just mean that you use elaboration very lightly. Others use it more heavily, and pragma Elaborate can be critical -- here is an extreme, though real, example. There is one Ada 83 compiler, written in Ada 83, where the main program is null, and all the compiler passes are in elaboration code. Pragma Elaborate is critical for ensuring that the passes of the compiler run in the right order. Sure, for the simple case you have DEC and Verdix (and most likely GNAT as well) run fine, but I can *guarantee* that they are not consistent in the set of programs that they can successfully handle statically. We cannot have a statement in the standard that says "Elaboration shall be automatically handled sufficiently well so that Mats Weber's programs run without Program_Error", what we need is a very precise charaterization of the set of programs that are to be considered legal. Mats, what is this subset that you propose? in detail?