1. About This Guide

For ease of exposition, ‘GNAT Pro’ will be referred to simply as ‘GNAT’ in the remainder of this document.

This guide describes the use of GNAT, a compiler and software development toolset for the full Ada programming language. It documents the features of the compiler and tools, and explains how to use them to build Ada applications.

GNAT implements Ada 95, Ada 2005, Ada 2012, and Ada 2022. You may also invoke it in Ada 83 compatibility mode. By default, GNAT assumes Ada 2012, but you can use a compiler switch (Compiling Different Versions of Ada) to explicitly specify the language version. Throughout this manual, references to ‘Ada’ without a year suffix apply to all versions of the Ada language starting with Ada 95.

GNAT supports both the GCC and LLVM back end compilation families. Most GNAT versions use the GCC back end, but some are now available using the LLVM back end. In some places in this manual, we distinguish between the two back ends, but in most cases, everything in this manual applies to both back ends. We refer to GNAT with the LLVM back end as ‘GNAT LLVM’. See GNAT with the LLVM Back End for limitations of GNAT LLVM.

1.1. What This Guide Contains

This guide contains the following chapters:

Appendices cover several additional topics:

1.2. What You Should Know before Reading This Guide

This guide assumes a basic familiarity with the Ada 95 language, as described in the International Standard ANSI/ISO/IEC-8652:1995, January 1995. Reference manuals for Ada 95, Ada 2005, and Ada 2012 are included in the GNAT documentation package.

1.4. Conventions

Following are examples of the typographical and graphic conventions used in this guide:

  • Functions, utility program names, standard names, and classes.

  • Option flags

  • File names

  • Variables

  • Emphasis

  • [optional information or parameters]

  • Examples are described by text

    and then shown this way.
    
  • Commands that you enter are shown as preceded by a prompt string comprising the $ character followed by a space.

  • Full file names are shown with the ‘/’ character as the directory separator; e.g., parent-dir/subdir/myfile.adb. If you are using GNAT on a Windows platform, please note that you should use the ‘\’ character instead.