GNAT is a free software compiler for Ada which forms part of the GNU Compiler Collection (GCC). It supports all versions of the language, i.e. Ada 2012, Ada 2005, Ada 95 and Ada 83. Originally its name was an acronym that stood for GNU NYU Ada Translator, but that name no longer applies. The front-end and run-time are written in Ada.

History

The GNAT project started in 1992 when the United States Air Force awarded New York University (NYU) a contract to build a free software compiler for Ada to help with the Ada 9X standardization process. The 3-million-dollar contract required the use of the GNU General Public License for all development, and assigned the copyright to the Free Software Foundation. The first official validation of GNAT occurred in 1995.

GNAT was initially released separately from the main GCC sources. On October 2, 2001, the GNAT sources were contributed to the GCC Concurrent Versions System repository.[1] The last version to be released separately was GNAT 3.15p, based on GCC 2.8.1, on October 2, 2002. Starting with GCC 3.4, on major platforms the official GCC release is able to pass 100% of the ACATS Ada tests included in the GCC testsuite. By GCC 4.0, more exotic platforms were also able to pass 100% of the ACATS tests.

Compatibility with Ada 83

GNAT was developed with Ada 9x in mind. However Ada has pretty good backwards compatibility so often times you'll find that Ada 83 code can compile fine on newer compilers. If you want to disallow any newer language features from Ada 95 and upwards however, you can tease GNAT into an Ada 83 compatibility mode. To do this you can pass the -gnat83 switch to GCC[2].

License

The compiler is licensed under the terms of the GNU General Public License Version 3 with GCC Runtime Library Exception.

All versions leading up to and including 3.15p are licensed under the GMGPL offering similar runtime exceptions. The GMGPL license is GNU GPL 2 with a linking exception that permits software with licenses that are incompatible with the GPL to be linked with the output of Ada standard generic libraries that are supplied with GNAT without breaching the license agreement.

Versions

FSF GNAT is part of most major Linux or BSD distributions and is included in the main GCC Sources.

GNAT Pro is a supported version of GNAT from AdaCore.

Notes

  1. GCC CVS mailing list archive "New language: Ada"
  2. [1] Ada 83 compatibility mode with the -gnat83 switch in GNAT

• Content created by Wikipedia contributors was used to create this page. Original source: https://en.wikipedia.org/wiki/GNAT.