[comp.lang.ada] Nested separate compilations

wtwolfe@hubcap.UUCP (Bill Wolfe) (01/13/89)

   I have now run into two compilers which balk at nested separate
   compilations, as per the following example:

      procedure A is

         procedure B is separate;

      begin [...] end A;

      ------------ in another file... ---------------

      separate (A);

      procedure B is

         procedure C is separate;

      begin [...] end B;

      ------------ in another file... ----------------

      separate (A.B);

      procedure C is begin [...] end C;

   Now according to the LRM, 

         subunit ::= [...] proper_body

         proper_body ::= subprogram_body [...]

         subprogram_body ::= [...] declarative_part [...]

         declarative_part ::= [...] later_declarative_item

         later_declarative_item ::= body [...]

         body ::= [...] body_stub

   and so nested separate compilation should be perfectly legal.  If there's
   anything in the LRM prohibiting this, I don't see it.  Is nested separate
   compilation legal?  If so, when will it be incorporated into the ACVC?  



                                            Bill Wolfe

                                     wtwolfe@hubcap.clemson.edu

billwolf@hubcap.clemson.edu (William Thomas Wolfe,2847,) (01/14/89)

From article <4079@hubcap.UUCP>, by wtwolfe@hubcap.UUCP (Bill Wolfe):
> 
>    I have now run into two compilers which balk at nested separate
>    compilations, as per the following example:

   After receiving e-mail to the effect that the ACVC *did* check for this,
   I did some investigation and discovered that the compilers did indeed
   accept the code IF SUBMITTED MANUALLY; it was the automatic recompilation
   facility which was causing the problem.  I had created a directory full
   of foreign code and invoked the automatic compilation-order tool in order
   to get the code compiled, and been rudely informed that the nested
   separate compilation units were missing (utter nonsense) and that c
   compilation was therefore not initiated.  When I collapsed the nested
   separates into the first-level stubs, everything worked perfectly.

   Thanks to everyone who sent mail!  Sorry for the (incorrect) semicolons
   in "separate (whatever);".  This is about the only place where you 
   can't have a semicolon at the end, and every time I make this mistake
   I wonder WHY semicolons are not allowed here, just for consistency reasons..


                                  
                                         Bill Wolfe

                                  wtwolfe@hubcap.clemson.edu