The following switches provide additional control over the elaboration order. For full details see Elaboration Order Handling in GNAT.
Program_Errorexception. This switch reverses the action of the binder, and requests that it deliberately choose an order that is likely to maximize the likelihood of an elaboration error. This is useful in ensuring portability and avoiding dependence on accidental fortuitous elaboration ordering.
Normally it only makes sense to use the -p
switch if dynamic
elaboration checking is used (-gnatE switch used for compilation).
This is because in the default static elaboration mode, all necessary
Elaborate_All pragmas are implicitly inserted.
These implicit pragmas are still respected by the binder in
-p mode, so a
safe elaboration order is assured.
Note that -p is not intended for production use; it is more for debugging/experimental use.