Next: , Previous: What to Do If the Default Elaboration Behavior Fails, Up: Elaboration Order Handling in GNAT


C.11 Elaboration for Dispatching Calls

In rare cases, the static elaboration model fails to prevent dispatching calls to not-yet-elaborated subprograms. In such cases, we fall back to run-time checks; premature calls to any primitive operation of a tagged type before the body of the operation has been elaborated will raise Program_Error.

Access-to-subprogram types, however, are handled conservatively, and do not require run-time checks. This was not true in earlier versions of the compiler; you can use the -gnatd.U debug switch to revert to the old behavior if the new conservative behavior causes elaboration cycles.