Next: Inspecting the Chosen Elaboration Order, Previous: Elaboration-related Compiler Switches, Up: Elaboration Order Handling in GNAT [Contents][Index]
A programmer should first compile the program with the default options, using none of the binder or compiler switches. If the binder succeeds in finding an elaboration order, then apart from possible cases involing dispatching calls and access-to-subprogram types, the program is free of elaboration errors.
If it is important for the program to be portable to compilers other than GNAT,
then the programmer should use compiler switch -gnatel and consider
the messages about missing or implicitly created Elaborate and
Elaborate_All pragmas.
If the binder reports an elaboration circularity, the programmer has several options:
-gnatwl.
-gnatel to obtain messages on generated implicit
Elaborate and Elaborate_All pragmas. The trace information could
indicate why a server unit must be elaborated prior to a client unit.
-gnatE.
-gnatH.
-gnatH -gnatE.
-gnatH -gnatJ.
-gnatH -gnatJ -gnatE.