Previous: Creating a Stand-alone Library to be used in a non-Ada context, Up: Stand-alone Ada Libraries


3.9.3.4 Restrictions in Stand-alone Libraries

The pragmas listed below should be used with caution inside libraries, as they can create incompatibilities with other Ada libraries:

When using a library that contains such pragmas, the user must make sure that all libraries use the same pragmas with the same values. Otherwise, Program_Error will be raised during the elaboration of the conflicting libraries. The usage of these pragmas and its consequences for the user should therefore be well documented.

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 the Version or Body_Version attributes are used inside a library, then 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.