Interaction between pragmas ELABORATE and INTE 86-12-01 AI-00298/05 1 | !standard 10.05 (04) 86-12-01 AI-00298/05 | !standard 13.09 (03) | !class ramification 84-10-16 | !status approved by WG9/AJPO 86-11-26 | !status approved by Director, AJPO 86-11-26 | !status approved by WG9/Ada Board 86-11-18 !status panel/committee-approved 86-09-11 (reviewed) !status panel/committee-approved 86-08-07 (pending editorial review) !status committee-approved (9-0-0) 86-05-12 (pending editorial review) !status work-item 86-04-14 !status received 84-10-16 !references AI-00306, AI-00180, 83-00457 !topic Interaction between pragmas ELABORATE and INTERFACE !summary 86-04-14 A pragma ELABORATE can be applied to a library unit whose body is supplied by a pragma INTERFACE. !question 86-04-16 Assume these two library units are compiled in the given order: procedure P; pragma INTERFACE (SOME_LANGUAGE, P); ---------------- with P; pragma ELABORATE (P); procedure Q is... According to 10.5(4), the library unit mentioned in a pragma ELABORATE "must have a library unit body". By 13.9(3), a body is "not allowed" for P above, so the second compilation is illegal. Is this correct? !response 86-08-05 The name given in a pragma ELABORATE can never make a compilation unit illegal, because if a pragma's argument does not correspond to what is allowed for the pragma, the pragma has no effect (2.8(9)). Therefore, if a pragma INTERFACE has been specified for a library subprogram and accepted by an implementation, it is not illegal to name this subprogram in a pragma ELABORATE. It is not necessary to give a pragma ELABORATE for such a subprogram, since an elaboration check need not be performed (see AI-00180). If an implementation nonetheless does perform an elaboration check, then it is consistent with AI-00180 for the implementation to also specify if the pragma ELABORATE has any useful effect for such subprograms.