Skip to main content


looks like the GNAT #Ada 95 compiler frontend first appeared in #GCC 3.1, May 15, 2002:

AdaCore, has contributed its GNAT Ada 95 front end and associated tools. The GNAT compiler fully implements the Ada language as defined by the ISO/IEC 8652 standard.


gnu.org/software/gcc/gcc-3.1/cโ€ฆ

#GCC #ada
in reply to theruran ๐ŸŒ๐Ÿด

#GNAT was initially released separately from the main GCC sources. On October 2, 2001, the GNAT sources were contributed to the GCC CVS repository. 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.


en.wikipedia.org/wiki/GNAT

#GCC #ada #gnat
in reply to theruran ๐ŸŒ๐Ÿด

Hmm, IIRC GCC 4.8 was the last version of GCC that was C only rather than C++, so you may be able to pretty easily bootstrap an Ada 95 GNAT using older GCC versions then!
in reply to nytpu โ€ฎ

well, I was gonna dig up the initial CVS contribution and see what it looked like, but I am almost certain it was Ada 95 code implementing the Ada 95 compiler.

Ada/Ed implemented Ada 83 so there's this chasm to cross. Anyone who feels like hacking on an Ada interpreter written in C may be able to do it. The README mentions the following caveats:

Ada/Ed was last validated under version 1.7 of the ACVC tests. Therefore it is not currently a validated Ada system, and users can expect to find small discrepancies between Ada/Ed and currently validated compilers.

Apart from the 100-odd tests of ACVC 1.11 that Ada/Ed currently fails, the major deficiency of the system is that, being an interpreter, it does not implement most representation clauses, and thus does not support systems
programming close to the machine level.

in reply to theruran ๐ŸŒ๐Ÿด

I wonder how hard it would be to write a tiny C implementation of Ada 95 that is exclusively capable of compiling the GNAT components of GCC 4.x, as a compliment to Bootstrappable's bootstrap process for the rest of GCC
in reply to nytpu โ€ฎ

Would it perhaps be easier to write a code generator that can generate C from the Ada code? That C code could then be used to bootstrap the compiler.

How's that for bizarre circular bootstrapping?

in reply to theruran ๐ŸŒ๐Ÿด

now that I think about it some more, I believe that there was a Pascal compiler that was bootstrapped this way, where the first version was hand compiled by reading the source writing the corresponding assembly.
โ‡ง