You should use the pragmas listed below with caution inside libraries, since they can create incompatibilities with other Ada libraries:
Locking_Policy
Partition_Elaboration_Policy
Queuing_Policy
Task_Dispatching_Policy
Unreserve_All_Interrupts
When using a library that contains such pragmas, the user of the
library must ensure that all libraries use the same pragmas with the
same values. Otherwise, Program_Error
will be raised during the
elaboration of the conflicting libraries. You should document the
usage of these pragmas and its consequences for the user.
Similarly, the traceback in the exception occurrence mechanism should be
enabled or disabled in a consistent manner across all libraries.
Otherwise, Program_Error
will be raised during the elaboration of the
conflicting libraries.
If you use the Version
or Body_Version
attributes inside a library, you need to
perform a gnatbind
step that specifies all ALI
files in all
libraries so that version identifiers can be properly computed.
In practice these attributes are rarely used, so this is unlikely
to be a consideration.