GNU Pascal

From Lazarus wiki
Jump to navigationJump to search

English (en) français (fr)

GNU Pascal (GPC) is the official Pascal compiler of the GNU project. It is compatible to Standard Pascal as defined in ISO 7185, and it implements "most" of the ISO 10206 Extended Pascal standard.

Unlike Free Pascal, GPC is not self-hosted, i.e. it is not able to translate and build itself (as the compiler is written in the C/C++ language). Rather, it acts as a frontend to GNU Compiler Collection (GCC), so that Pascal code is translated to C and from C to machine language.

This has the advantage that it is instantly portable to any platform the GCC compiler supports. However, since GNU Pascal is not more than a frontend, it does have to adapt to every major change that is done to GCC. Therefore, new major versions are adopted only slowly. It is also incompatible with newer versions of the GNU C++ Compiler. The official site says it is only compatible with versions 2.8.1, 2.95.x, 3.2.x, 3.3.x or 3.4.x of the GNU C++ compiler.

GPC was last updated in 2005. The last version of the GNU C++ compiler that it is compatible with, is 3.4.6, dated March, 2006.

Free Pascal is expected to generate more efficient machine code than GPC.

External links

Various Pascal Compilers:
Pascal 8000 (AAEC) | Alice Pascal | Apple Pascal | Borland Pascal | Clascal | Delphi | Free Pascal Compiler (FPC) | GNU Pascal | Kylix | Lisa Pascal | Mac Pascal | Metrowerks Pascal | NBS Pascal | OMSI Pascal | PascalABC.net | P32 | Sibyl | Smart Pascal | Stanford Pascal Compiler | Swedish Pascal | THINK Pascal | Turbo Pascal | UCSD Pascal | VAX Pascal | Virtual Pascal | winsoft PocketStudio
An extensive list of compilers was maintained at Pascaland (Internet Archive Version) up to January 2018.