XGC User's Guide

Using the Ada Compiler

Chris Nettleton

License

XGC Ada is commercial open-source distributed under the terms of the GNU Public license. Permission is granted to make and distribute verbatim copies of this document provided the copyright notice and this permission notice are preserved on all copies. Permission is granted to copy and distribute modified versions of this document under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one. Permission is granted to copy and distribute translations of this document into another language, under the above conditions for modified versions.


Table of Contents
About This Guide
Audience
Related Documents
Reader's Comments
Documentation Conventions
1. Compiling with GCC
1.1. Compiling Programs
1.2. Switches for GCC
1.2.1. Error Message Control
1.2.2. Debugging and Assertion Control
1.2.3. Run-Time Checks
1.2.4. Using GCC for Syntax Checking
1.2.5. Using GCC for Semantic Checking
1.2.6. Compiling Ada 83 Programs
1.2.7. Style Checking
1.2.8. Character Set Control
1.2.9. File Naming Control
1.2.10. Subprogram Inlining Control
1.2.11. Auxiliary Output Control
1.2.12. Debugging Control
1.3. Search Paths and the Run-Time Library
1.4. Order of Compilation Issues
1.5. Examples
2. Binding with gnatbind
2.1. Running gnatbind
2.2. Consistency-Checking Modes
2.3. Binder Error Message Control
2.4. Elaboration Control
2.5. Output Control
2.6. Binding for Non-Ada Main Programs
2.7. Summary of Binder Switches
2.8. Search Paths for gnatbind
2.9. Examples of gnatbind Usage
3. Linking with gnatlink
3.1. Running gnatlink
3.2. Switches for gnatlink
4. Making Programs with gnatmake
4.1. Running gnatmake
4.2. Switches for gnatmake
4.3. Mode switches for gnatmake
4.4. Notes on the Command Line
4.5. How gnatmake Works
4.6. Examples of gnatmake Usage
5. Renaming Files with gnatchop
5.1. Handling Files with Multiple Units
5.2. Command Line for gnatchop
5.3. Switches for gnatchop
5.4. Examples of gnatchop Use
6. The Cross-Reference Utilities
6.1. Command Line of gnatxref
6.2. Switches for gnatxref
6.3. Command Line of gnatfind
6.3.1. Regular expressions in gnatfind and gnatxref
6.4. Example of the Use of gnatxref
7. Shortening File Names with gnatkr
7.1. About gnatkr
7.2. Using gnatkr
7.3. Crunching Method
7.4. Examples of gnatkr Usage
8. Preprocessing with gnatprep
8.1. Using gnatprep
8.2. Switches for gnatprep
8.3. Form of definitions file
8.4. Form of input text for gnatprep
9. The Library Browser gnatls
9.1. Running gnatls
9.2. Switches for gnatls
9.3. Example of the Use of gnatls
10. Other Utility Programs
10.1. Using Other Utility Programs With XGC Ada
10.2. The gnatpsys Utility Program
10.3. The gnatpsta Utility Program
10.4. The External Symbol Naming Scheme of XGC Ada
A. The Compilation Model
A.1. Source Representation
A.2. Foreign Language Representation
A.2.1. Latin-1
A.2.2. Other Eight-Bit Codes
A.2.3. Wide Character Encodings
A.3. File Naming Rules
A.4. Using Other File Names
A.5. Naming of XGC Ada Source Files
A.6. Generating Object Files
A.7. Source Dependencies
A.8. The Ada Library Information Files
A.9. Representation of Time Stamps
A.10. Binding an Ada Program
A.11. Mixed Language Programming
A.12. Comparison of XGC Ada With C/C++ Compilation Model
A.13. Comparison of XGC Ada With Ada Library Model
B. Handling of Configuration Pragmas
B.1. The gnat.adc File
C. Handling Elaboration Order
C.1. Elaboration Code in Ada 95
C.2. Checking the Elaboration Order in Ada 95
C.3. Controlling the Elaboration Order in Ada 95
C.4. Controlling Elaboration in XGC Ada - Internal Calls
C.5. Controlling Elaboration in XGC Ada - External Calls
C.6. Default Behavior in XGC Ada - Ensuring Safety
C.7. What to do if the Default Elaboration Behavior Fails
C.8. Elaboration for Access-to-Subprogram Values
C.9. Summary of Procedures for Elaboration Control
D. Performance Considerations
D.1. Controlling Run-time Checks
D.2. Optimization Levels
D.3. Inlining of Subprograms
Index