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.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,23dabf88feae3dba,start X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news2.google.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "Alex R. Mosteo" Newsgroups: comp.lang.ada Subject: Elaboration worries Date: Wed, 21 Jun 2006 14:33:06 +0200 Message-ID: <4fssh9F1ena5jU1@individual.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: individual.net 7g5n6T9Di9elc8cRB8Wb7gtplbS8IkKfhyPi6CjJobAkpUTmI= User-Agent: KNode/0.10.2 Xref: g2news2.google.com comp.lang.ada:4874 Date: 2006-06-21T14:33:06+02:00 List-Id: Hello, I'm revisiting this topic in hope of enlightenment by someone that really understand the dark magic behind elaboration. I've read the relevant sections of the ARM but I can just grasp a more-or-less depth understanding, of which details fade away with time. >From past discussions and from reading an old article of Mr. Dewar, my rule of thumb is that you should a) make your package Pure. b) if not possible, make it Preelaborate. c) if not possible, put an Elaborate_Body in the spec. I was happy following this rule, but just recently I've started to experiment with the -gnatwl switch, that warns when a "Elaborate_All" is needed. I have two questions related with this. The first one is that I don't really grasp why a "Elaborate_All" could be needed if one strictly follows the tree rules above. The second one is this: by my observation of the gnat warnings, it seems that the requirement for "Elaborate_All" is a "server side" one. However, I must use the E_A in all "client side" units. This is because contrarily to the abc) rule pragmas, that can refer to the package where they appear, E_A can not. Example: Package A causes a warning for E_A in all packages that use A. I can't do nothing at A to remove the warning, but to put an E_A(A) in all client packages. This seems strange to me. A final note is that this second situation happens to me mostly with generic units. Thanks for any comments, A. Mosteo.