Next: , Previous: Binder Error Message Control, Up: Switches for gnatbind


4.2.3 Elaboration Control

The following switches provide additional control over the elaboration order. For full details see Elaboration Order Handling in GNAT.

-p
Normally the binder attempts to choose an elaboration order that is likely to minimize the likelihood of an elaboration order error resulting in raising a Program_Error exception. 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.