Chapter 3. Implementation-Defined Pragmas

Table of Contents
3.1. pragma Ada_83
3.2. pragma Ada_95
3.3. pragma Annotate
3.4. pragma Assert
3.5. pragma C_Pass_By_Copy
3.6. pragma Common_Object
3.7. pragma Complex_Representation
3.8. pragma Component_Alignment
3.9. pragma Debug
3.10. pragma Export_Function ...
3.11. pragma Export_Object ...
3.12. pragma Export_Procedure ...
3.13. pragma Export_Valued_Procedure
3.14. pragma Ident
3.15. Import_Function ...
3.16. pragma Import_Object
3.17. pragma Import_Procedure
3.18. pragma Import_Valued_Procedure ...
3.19. pragma Interface_Name
3.20. pragma Linker_Alias
3.21. pragma Linker_Section
3.22. pragma Normalize_Scalars
3.23. pragma Machine_Attribute ...
3.24. pragma No_Return
3.25. pragma Psect_Object
3.26. Pragma Pure_Function
3.27. pragma Share_Generic
3.28. pragma Source_File_Name
3.29. pragma Source_Reference
3.30. pragma Subtitle
3.31. pragma Suppress_All
3.32. pragma Title
3.33. pragma Unchecked_Union
3.34. pragma Unimplemented_Unit
3.35. pragma Unsuppress
3.36. pragma Warnings
3.37. pragma Weak_External

The Ada 95 Reference Manual defines a set of pragmas that can be used to supply additional information to the compiler. These language-defined pragmas are implemented in ERC32 Ada and work as defined.

In addition, the Ada 95 Reference Manual allows implementations to define extra pragmas whose meaning is defined by the implementation. ERC32 Ada provides a number of these implementation-dependent pragmas, which can be used to extend and enhance the functionality of the compiler. This Chapter describes these additional pragmas.

3.1. pragma Ada_83

Syntax
pragma Ada_83;

A configuration pragma that establishes Ada 83 mode for the unit to which it applies, regardless of the mode set by the command line switches. In Ada 83 mode, ERC32 Ada attempts to be as compatible with the syntax and semantics of Ada 83, as defined in the original Ada 83 Reference Manual as possible. In particular, the new Ada 95 keywords are not recognized, optional package bodies are allowed, and generics may name types with unknown discriminants without using the (<>) notation. In addition, some but not all of the additional restrictions of Ada 83 are enforced.

Ada 83 mode is intended for two purposes. Firstly, it allows existing legacy Ada 83 code to be compiled and adapted to ERC32 Ada with less effort. Secondly, it aids in keeping code backwards compatible with Ada 83. However, there is no guarantee that code that is processed correctly by ERC32 Ada in Ada 83 mode will in fact compile and execute with an Ada 83 compiler, since ERC32 Ada does not enforce all the additional checks required by Ada 83.